【问题标题】:Plot result of multiple dimensions K means绘制多维 K 均值的结果
【发布时间】:2012-11-24 08:42:17
【问题描述】:

我对 R 中的 Kmeans 有疑问。我有一个数据框,例如 R 中可用的 IRIS 数据。我找到了一个 website,他们在其中创建了一个我喜欢的 kmeans 结果:

我的问题是,我想用自己的数据(数据框 100X4)重现该图,但我找不到如何做到这一点。谁能帮我这个?

【问题讨论】:

标签: r dataframe k-means


【解决方案1】:

这是一个平行坐标图。例如,您可以使用 MASS 中的 parcoord 函数 --

library(MASS)
iris$Species = as.numeric(iris$Species)
parcoord(iris, col=iris$Species)

【讨论】:

  • 谢谢,这正是我想要的!
猜你喜欢
  • 1970-01-01
  • 2018-04-04
  • 2021-12-13
  • 2013-05-02
  • 2023-03-30
  • 2015-06-12
  • 2013-10-20
  • 2015-03-16
  • 1970-01-01
相关资源
最近更新 更多