snoweye / EMCluster

EM Algorithm for Model-Based Clustering of Finite Mixture Gaussian Distribution
Mozilla Public License 2.0
17 stars 0 forks source link

simple.init() runs forever with small matrices #14

Open torockel opened 2 years ago

torockel commented 2 years ago

Hi everyone,

simple.init() seem to run forever with some small matrices. For example:

set.seed(123)
ds <- matrix(rnorm(50), ncol = 5)
EMCluster::simple.init(ds, nclass = 2)

never finished on my machine. But,

set.seed(123)
ds <- matrix(rnorm(500), ncol = 5)
EMCluster::simple.init(ds, nclass = 2)
#> Method: 
#>  n = , p = 0.82147030.1785297, nclass = , flag = , logL = .
#>  conv.iter = , conv.eps = ,
#> nc: 
#> NULL
#> pi: 
#> [1] 0.8215 0.1785

Created on 2022-03-22 by the reprex package (v2.0.1)

runs in under a second.