Closed indu-bodala closed 2 years ago
Found an issue with discreteness and corrected it. It works now!
Ok, good. Please also note that the parameter name is variables
, not variable.names
.
Yes, I corrected that. Then I got the error: Dataset contains values out of bounds for variables. That's when I realized the issue with discreteness.
Thanks!
Hi,
I am facing problems while creating a BNDataset. I am reading a 9x80 matrix from a .csv file and this is supposed to contain 9 observations for 5 timesteps and 16 variables. Let's call this dbn_data.
I am reading it as follows: dbn_data <- read.csv("data_dbn.csv") dataset <- BNDataset(data = dbn_data, discreteness = rep(discon,5), node.sizes = rep(ns,5), variable.names = colnames(dbn_data), num.time.steps = 5, starts.from = 0, na.string.symbol = 'NA')
discon and ns are character and integer vectors respectively of size 16.
I am getting the following error: Error in validObject(x) : invalid class “BNDataset” object: incoherent number of variables in raw dataset
I have missing values in the data. Not sure is this is causing the problem. Am I supposed to do the imputation before creating BNDataset?
Thank you very much in advance.