plotcluster和clusplot之间的区别
我有两个不同的函数来绘制k-means的结果,plotcluster和clusplot之间的区别,r,cluster-computing,k-means,R,Cluster Computing,K Means,我有两个不同的函数来绘制k-means的结果,plotcluster和clustlot,但我不明白区别是什么。有人能解释一下区别吗 fit <- kmeans(mydataScaled, 3) # Cluster Plot against 1st 2 principal components # vary parameters for most readable graph library(cluster) clusplot(mydataScaled, fit$cluster, col
plotcluster
和clustlot
,但我不明白区别是什么。有人能解释一下区别吗
fit <- kmeans(mydataScaled, 3)
# Cluster Plot against 1st 2 principal components
# vary parameters for most readable graph
library(cluster)
clusplot(mydataScaled, fit$cluster, color=TRUE, shade=TRUE,
labels=2, lines=0)
# Centroid Plot against 1st 2 discriminant functions
library(fpc)
plotcluster(mydataScaled, fit$cluster)
fit