Mclust freezes with small dataset

158 views Asked by At

I am trying to use the Mclust() function from the R-package mclust on a dataset with 500 observations and 2 variables, and I want to identify 2 clusters.

> head(data)
           x          y
1  0.9929185 -1.9662945
2  8.2259360 -0.7240049
3  3.3866952 -1.8054764
4 -0.5161490 -2.3096992
5  1.8931073 -1.8928091
6  4.0833228 -1.9045669

> Mclust(data, G = 2)
fitting ...
  |===============================================================                                          |  67%

This should produce an output relatively quickly, but freezes at 67%. I ran this function multiple times over different datasets, and had no problems whatsoever. It even works if I only include observations up to row 498, but fails as soon as row 499+ is included.

498 -1.710175250 -1.612248596
499 -5.666497204  5.565422240
500 -3.649579976  1.552779499 

I have uploaded the whole dataset in my GitHub repository: https://github.com/fstermann/bthesis/tree/main/MclustFreeze

I would greatly appreciate if anyone has an idea why this is happing with this specific dataset.

> sessionInfo()
R version 4.0.5 (2021-03-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default 

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] mclust_5.4.7

loaded via a namespace (and not attached):
[1] compiler_4.0.5 tools_4.0.5  
0

There are 0 answers