set.seed(15)
generatedData <- generateSampleDataBin(100, 4, c(0.1, 0.2, 0.3, 0.4), 25, 0)
resultforpsm <- list()
for (i in 1:5){ #use 5 initialisations
mix <- runVICatMix(generatedData$data, 10, 0.01, tol = 0.005)
resultforpsm[[i]] <- mix$model$labels
}
p1 <- t(matrix(unlist(resultforpsm), 100, 5))
psm <- mcclust::comp.psm(p1)
# Compute modified Variation of Information for each partition from VICatMix runs
VI.lb(p1, psm)
Run the code above in your browser using DataLab