R Under development (unstable) (2023-12-12 r85669 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(Rmixmod) Loading required package: Rcpp Rmixmod v. 2.1.10 / URI: www.mixmod.org > data(iris) > data <- iris[, 1:4] > labels <- ifelse(iris[5] == "virginica", 3, ifelse(iris[5] == "versicolor", 2, 1)) > rand <- sample(c(rep(1, each = 50), rep(0, each = 100))) > kl <- labels * rand > mixmodCluster(data, nbCluster = 3, knownLabels = kl) **************************************** *** INPUT: **************************************** * nbCluster = 3 * criterion = BIC **************************************** *** MIXMOD Models: * list = Gaussian_pk_Lk_C * This list includes only models with free proportions. **************************************** * data (limited to a 10x10 matrix) = Sepal.Length Sepal.Width Petal.Length Petal.Width [1,] 5.1 3.5 1.4 0.2 [2,] 4.9 3 1.4 0.2 [3,] 4.7 3.2 1.3 0.2 [4,] 4.6 3.1 1.5 0.2 [5,] 5 3.6 1.4 0.2 [6,] 5.4 3.9 1.7 0.4 [7,] 4.6 3.4 1.4 0.3 [8,] 5 3.4 1.5 0.2 [9,] 4.4 2.9 1.4 0.2 [10,] 4.9 3.1 1.5 0.1 * ... ... * knownLabels = 1 1 0 0 1 0 0 0 0 0 ... **************************************** *** MIXMOD Strategy: * algorithm = EM * number of tries = 1 * number of iterations = 200 * epsilon = 0.001 *** Initialization strategy: * algorithm = smallEM * number of tries = 10 * number of iterations = 5 * epsilon = 0.001 * seed = NULL **************************************** **************************************** *** BEST MODEL OUTPUT: *** According to the BIC criterion **************************************** * nbCluster = 3 * model name = Gaussian_pk_Lk_C * criterion = BIC(611.5840) * likelihood = -240.6538 **************************************** *** Cluster 1 * proportion = 0.3333 * means = 5.0060 3.4280 1.4620 0.2460 * variances = | 0.1516 0.0639 0.0851 0.0222 | | 0.0639 0.0823 0.0323 0.0188 | | 0.0851 0.0323 0.0984 0.0249 | | 0.0222 0.0188 0.0249 0.0223 | *** Cluster 2 * proportion = 0.3239 * means = 5.9277 2.7709 4.2443 1.3184 * variances = | 0.2187 0.0922 0.1228 0.0320 | | 0.0922 0.1188 0.0466 0.0271 | | 0.1228 0.0466 0.1419 0.0359 | | 0.0320 0.0271 0.0359 0.0321 | *** Cluster 3 * proportion = 0.3428 * means = 6.5779 2.9675 5.5312 2.0139 * variances = | 0.3904 0.1646 0.2192 0.0572 | | 0.1646 0.2121 0.0831 0.0484 | | 0.2192 0.0831 0.2533 0.0641 | | 0.0572 0.0484 0.0641 0.0574 | **************************************** > > proc.time() user system elapsed 0.29 0.06 0.34