我使用ClusterR::Kmeans_arma
选择了质心。我确认使用mgcv::uniquecombs
的质心不相同,但仍然出现initial centers are not distinct
错误。
> dim(t(dat))
[1] 13540 11553
> centroids = ClusterR::KMeans_arma(data = t(dat), centers = 561,
n_iter = 50, seed_mode = "random_subset",
verbose = FALSE, CENTROIDS = NULL)
> dim(centroids)
[1] 561 11553
> x = mgcv::uniquecombs(centroids)
> dim(x)
[1] 561 11553
> res = kmeans(t(dat), centers = centroids, iter.max = 200)
Error in kmeans(t(dat), centers = centroids, iter.max = 200) :
initial centers are not distinct
有解决此问题的建议吗?谢谢!
我对kmeans聚类提供质心有问题。我看到已经问过相同的问题(K均值:初始中心不明显),但是该帖子中的解决方案不适用于我的情况。 ...