0

我正在尝试在具有 500 个观察值和 2 个变量的数据集上使用 R 包 mclust 中的 Mclust() 函数,并且我想识别 2 个集群。

> 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%

这应该会相对较快地产生输出,但会冻结在 67%。我在不同的数据集上多次运行这个函数,没有任何问题。如果我只包含直到第 498 行的观察结果,它甚至可以工作,但一旦包含第 499+ 行,它就会失败。

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

我已经在我的 GitHub 存储库中上传了整个数据集:https ://github.com/fstermann/bthesis/tree/main/MclustFreeze

如果有人知道为什么这个特定的数据集会发生这种情况,我将不胜感激。

> 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  
4

0 回答 0