从cmeans中提取中心

时间:2016-02-16 21:35:57

标签: r

来自这个cmeans函数:

 x1=c(55,60,75,80)
 x2=c(30,20,15,23)
 x3=c(4,3,2,6)
 x=data.frame(x1,x2,x3)
  library(e1071)
  fcm=cmeans(x,2,80)
  fcm

  #  Fuzzy c-means clustering with 2 clusters

  #  Cluster centers:
  #      v1       v2       v3
  #  1 57.40432 25.29914 3.532451
  #  2 77.40394 19.06642 4.018641

   # Memberships:
   #   1          2
   # [1,] 0.95674506 0.04325494
   # [2,] 0.89673114 0.10326886
   # [3,] 0.05938016 0.94061984
   # [4,] 0.04769093 0.95230907

   # Closest hard clustering:
   #  [1] 1 1 2 2
从该结果

如何仅提取Cluster centers部分: 如何在r ???没有变量名称

 1 57.40432 25.29914 3.532451
 2 77.40394 19.06642 4.018641

1 个答案:

答案 0 :(得分:2)

此矩阵由fcm$centers给出。