问题描述
我在Mclust/GMM的生产中实施了集群解决方案.该算法正在初始数据上运行,并且该解决方案将应用于看不见的数据(predict.Mclust).它运行良好,现在当我对相同数据使用相同种子运行函数时,它为我提供了不同的解决方案.有其中没有观测值的星团.怎么会这样非常感谢您的帮助.先感谢您.如果您需要更多详细信息,请告诉我
I implemented a Cluster Solution in production with Mclust / GMM. The algorithm is running on initial data and the solution will be applied on unseen data (predict.Mclust).It worked fine and now it gives me a different solution when I run the function with the same seed to the same data. There are clusters with no observations in it. How can this happen? I really appreciate your help. Thank you in advance. If you need further details please let me know
推荐答案
此问题与从R-3.6开始的 sample()
函数的更改有关.看到这篇文章:[1]:已设置.seed在不同版本的R(和Ubuntu)上是否一致?
The problem is related to the change in the sample()
function from R-3.6 on. See this post:[1]: Is set.seed consistent over different versions of R (and Ubuntu)?
在版本R-3.6之后,要获得相同的结果,请在设置种子之前使用此函数的调用: RNGkind(sample.kind ="Rounding")
After Version R-3.6, to get the same results, use a call to this function before setting your seed: RNGkind(sample.kind = "Rounding")
谢谢@ Luca Scrucca的支持
Thank you @ Luca Scrucca for your support
这篇关于集群中没有观测值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!