sk-means聚类 - 如何获得聚类结果

时间:2014-04-28 10:52:30

标签: r cluster-analysis text-mining

我在研究中使用了k-means和sk-means。在K-means聚类中,为了获得聚类,

# k-means clustering of tweets
k<-6
kmeansResult<-kmeans(m3,k)

# Cluster centers
round(kmeansResult$centers,digits=3)

for(i in 1:k){
at(paste("cluster",i,":",sep=""))
s<-sort(kmeansResult$centers[i,],decreasing=T)
cat(names(s)[1:3],"\n")
}

对于sk-means聚类,我设法直到

m3_new <- m3[slam::row_sums(m3) > 0, ]
skmeansResult<-skmeans(m3_new,k)

我应该采取哪些步骤来获得群集结果?

1 个答案:

答案 0 :(得分:0)

km_clus <- kmeansResult$cluster

sk_clus <- skmeansResult$cluster