# NOT RUN {
data(galaxies, package = "MASS")
galaxies <- galaxies / 1000
# use several random starting points
BIC <- NULL
for(j in 1:100)
{
rBIC <- mclustBIC(galaxies, verbose = FALSE,
initialization = list(hcPairs = hcRandomPairs(galaxies)))
BIC <- mclustBICupdate(BIC, rBIC)
}
pickBIC(BIC)
plot(BIC)
mod <- Mclust(galaxies, x = BIC)
summary(mod)
# }
Run the code above in your browser using DataLab