Open alexrai93 opened 3 months ago
Hi, this code crashes my rstudio session when caching a model with poisson node containing decimal data.
I noticed that a few values I was working with had decimals and the issue was fixed when I rounded them to whole numbers.
Edit: I might suggest as it also causes issues with fitting a dag to throw an error if a Poisson node is numeric.
R 4.41 / Windows 11 Thanks!
====
options(scipen = 999) library(tidyverse) library(abn)
CarMod <- data.frame( fueltype = factor(rep(c("gas", "diesel"), each = 2, length.out = 10)), wheels = rep(c(1,2,3), each = 2, length.out = 10), length = rep(c(1,2,3), each = 2, length.out = 10) * 100, price = rep(c(1000.1, 10000, 13033, 10102, 10101),2))
dists <- list( fueltype = "binomial", wheels = "gaussian", length = "gaussian", price = "poisson" )
cache <- buildScoreCache(CarMod, data.dists = dists, method = "mle")
@j-i-l this might be related to #67
Hi @alexrai93,
thanks for reporting this! I'll have a closer look at this in the next few days.
https://github.com/furrer-lab/abn/actions/runs/10178067854/job/28150934784#step:10:298 might be related
Hi, this code crashes my rstudio session when caching a model with poisson node containing decimal data.
I noticed that a few values I was working with had decimals and the issue was fixed when I rounded them to whole numbers.
Edit: I might suggest as it also causes issues with fitting a dag to throw an error if a Poisson node is numeric.
R 4.41 / Windows 11 Thanks!
====
options(scipen = 999) library(tidyverse) library(abn)
CarMod <- data.frame( fueltype = factor(rep(c("gas", "diesel"), each = 2, length.out = 10)), wheels = rep(c(1,2,3), each = 2, length.out = 10), length = rep(c(1,2,3), each = 2, length.out = 10) * 100, price = rep(c(1000.1, 10000, 13033, 10102, 10101),2))
dists <- list( fueltype = "binomial", wheels = "gaussian", length = "gaussian", price = "poisson" )
cache <- buildScoreCache(CarMod, data.dists = dists, method = "mle")