赞
踩
目录
主成分分析结果
- house.pca = princomp(house,cor = TRUE)
- names(house.pca)
-
- summary(house.pca)
-
- house.pca$scores
-
- plot(house.pca
- house1 = read.csv("C:/Users/21138/Desktop/houses.csv")
- house = house1
- name = house1$城市
- house.pca = princomp(house,cor = TRUE)
- names(house.pca)
- house.pca <- princomp(house, cor = TRUE)
- house.kmeans <- kmeans(house.pca$scores[,1:2], 4)
-
- fviz_pca_ind(house.pca,
- habillage= house.kmeans$cluster,
- addEllipses = TRUE,
- repel = TRUE,
- ellipse.level=0.9,
- ) + ggtitle('')
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。