警告:在r中没有收敛于K-均值聚类的10次迭代

发布于 2025-01-21 12:12:33 字数 528 浏览 4 评论 0原文

我试图通过使用GAP统计量找到最佳的群集数。我已经将iter.max提高到50:

差距统计数据
set.seed(123)
fviz_nbclust(data.s[, -c(1)], kmeans, nstart = 25,  method = "gap_stat", nboot = 1000)+
  labs(subtitle = "Gap statistic method",iter.max=50)

,但是覆盖范围问题尚未解决,我仍然收到以下警告:

Warning: did not converge in 10 iterations
......Warning: did not converge in 10 iterations
.Warning: did not converge in 10 iterations
....Warning: did not converge in 10 iterations
.Warning: did not converge in 10 iterations

I trying to find optimal number of cluster by using Gap statistic. I have already increased iter.max to 50:

Gap statistic
set.seed(123)
fviz_nbclust(data.s[, -c(1)], kmeans, nstart = 25,  method = "gap_stat", nboot = 1000)+
  labs(subtitle = "Gap statistic method",iter.max=50)

However, the coverage problem is not solved and I still got the following warning:

Warning: did not converge in 10 iterations
......Warning: did not converge in 10 iterations
.Warning: did not converge in 10 iterations
....Warning: did not converge in 10 iterations
.Warning: did not converge in 10 iterations

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

泪意 2025-01-28 12:12:33

看来您遇到的问题是您在实验室而不是fviz_nbclust函数中包括了iter.max = 50。尝试这个,

set.seed(123)
fviz_nbclust(data.s[, -c(1)], kmeans, nstart = 25,  method = "gap_stat", nboot = 1000, iter.max=50)+
  labs(subtitle = "Gap statistic method")

It looks like the problem you are having is that you included the iter.max=50 within the labs instead of the fviz_nbclust function. Try this,

set.seed(123)
fviz_nbclust(data.s[, -c(1)], kmeans, nstart = 25,  method = "gap_stat", nboot = 1000, iter.max=50)+
  labs(subtitle = "Gap statistic method")
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文