dm13450 / dirichletprocess

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

Error in y[which(clusterLabels == i), , drop = FALSE] : subscript out of bounds #16

Closed nick-torenvliet closed 4 years ago

nick-torenvliet commented 4 years ago

knitr::opts_chunk$set(warning = FALSE, message = FALSE) require(dirichletprocess) require(ggplot2) require(dplyr) require(tidyr) numIts <- 1000 faithfulTrans <- scale(faithful) dp <- DirichletProcessMvnormal(faithfulTrans) dp <- Fit(dp, numIts) plot(dp) dp2 <- DirichletProcessMvnormal(faithfulTrans, numInitialClusters = nrow(faithfulTrans)) dp2 <- Fit(dp2, numIts) plot(dp2)

From the tutorial, bails with, Error in y[which(clusterLabels == i), , drop = FALSE] : subscript out of bounds. It doesn't matter what value I set numInitialClusters to.

dm13450 commented 4 years ago

This is fixed in the dev version. This will be released to CRAN asap