dm13450 / dirichletprocess

Build dirichletprocess objects for data analysis
https://dm13450.github.io/dirichletprocess/
58 stars 14 forks source link

Issue with the LikelihoodDP() function #30

Open sergioventurini opened 1 year ago

sergioventurini commented 1 year ago

I noticed that in the latest release the LikelihoodDP() function resizes the likelihoodValues object using the code

dim(likelihoodValues) <- c(nrow(dpobj$data), dpobj$numberClusters)

but this shuffles the values in a strange way. I think it should be replaced by something like

likelihoodValues <- matrix(likelihoodValues, nrow = dpobj$n, ncol = dpobj$numberClusters, byrow = TRUE)

Looking forward to know what do you think about it. Thanks!