So, I've had the BHC package working for a time course experiment before. I'm trying to use the multinomial option instead of the timecourse one and it's breaking, spectacularly. The basic use case in the documentation works, but is very easy to break.
I started off with matrix of data, 47 rows, 10 columns, which upon running, immediately crashed R.
counts = read.table( datafile,sep=",", header=TRUE,row.names=1 , stringsAsFactors = FALSE ) itemLabels <- rownames(counts) counts<-as.matrix(counts) counts<-log(counts+1) hc1 <- bhc(counts, itemLabels, dataType="multinomial",verbose=TRUE)
So I retreated to the sample code, replacing the first line of the sample matrix with the first line of my data. Again it crashed.
So I started incrementing the first element of the sample matrix by 1. When I get to 4, I get the following:
data <- matrix(0,15,10) itemLabels <- vector("character",15) data[1:5,] <- 1 ; itemLabels[1:5] <- "a" data[6:10,] <- 2 ; itemLabels[6:10] <- "b" data[11:15,] <- 3 ; itemLabels[11:15] <- "c" data[1,1]<-5 hc1 <- bhc(data, itemLabels, verbose=TRUE) plot(hc1, axes=FALSE) [1] Running Bayesian Hierarchical Clustering.... [1] "DataType: multinomial" [1] Optimising global hyperparameter... Error! Input value outside range 0 0 4 Error! Input value outside range 0 0 4 Error! Input value outside range 0 0 4 Error! Input value outside range 0 0 4 Error! Input value outside range 0 0 4 Error! Input value outside range 0 0 4 Error! Input value outside range 0 0 4 Error! Input value outside range 0 0 4 Error! Input value outside range 0 0 4 Error! Input value outside range 0 0 4 Error! Input value outside range 0 0 4 Error! Input value outside range 0 0 4 Error! Input value outside range 0 0 4 Error! Input value outside range 0 0 4 [1] 0.7642338 -93.6824384 Error! Input value outside range 0 0 4 [1] 1.236254 -105.083198 Error! Input value outside range 0 0 4 [1] 0.4309005 -83.3977250 Error! Input value outside range 0 0 4 [1] 0.4309005 -83.3977250 Error! Input value outside range 0 0 4 [1] 0.4309005 -83.3977250 [1] Hyperparameter: 0.430900452187475 [1] Lower bound on overall LogEvidence: -8.3398e+01 [1] *******************
If you increase the first element up to 10, it crashes R, with a whole bunch of "Error! Input value outside range" errors.
It's happening on multiple machines, so I'm guessing it's not mine.
I've also reinstalled BHC just to make sure and still get the same thing.
Thoughts?
Cheers
Ben.
I have the same problem. Do you solve it?
Thanks.
Christian.