n<-seq(1,50,by=4)
2(x<-¡USArrests[n,])#print()
hc1<-hclust(dist(x),method="complete")
4hc2<-hclust(dist(scale(x)),method="complete")
hc3<-hclust(dist(x),method="ave")
layout(matrix(c(1,1,2,3),nrow=2,byrow=T))
plot(hc1);plot(hc2);plot(hc3)



R语言学习之聚类

library(cluster)
clusplot(x,pam(x,2)$clustering)

R语言学习之聚类

转载于:https://my.oschina.net/u/236959/blog/90519

相关文章:

  • 2021-05-07
  • 2021-08-10
  • 2021-11-03
  • 2021-11-15
  • 2021-06-21
  • 2021-05-31
  • 2021-08-18
  • 2022-12-23
猜你喜欢
  • 2021-04-08
  • 2021-06-05
  • 2022-12-23
  • 2021-12-13
  • 2021-06-03
  • 2021-08-25
  • 2021-05-28
相关资源
相似解决方案