Cluster contains no observations

108 views Asked by At

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

Output

1

There are 1 answers

0
crm_analytics On BEST ANSWER

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)?

After Version R-3.6, to get the same results, use a call to this function before setting your seed: RNGkind(sample.kind = "Rounding")

Thank you @ Luca Scrucca for your support