简体   繁体   English

在 R 的散点图矩阵中可视化 PCA

[英]Visualizing PCA in a scatterplot matrix in R

Im new to R and cleaned the https://www.kaggle.com/camnugent/california-housing-prices dataset (removed Ocean_proximity column) and used this function on it我是 R 的新手并清理了https://www.kaggle.com/camnugent/california-housing-prices数据集(已删除 Ocean_proximity 列)并在 574AB1C 上使用了此 ZC1C425Z68E68385D14
housing.pca <- prcomp(housing, center = TRUE,scale. = TRUE)
The summary tells me a Proportion of Variance 0.2483 0.2187 0.2014 0.1753...摘要告诉我方差的比例 0.2483 0.2187 0.2014 0.1753 ...
I now want to use a scatterplot matrix to visualize the first 4 PCA Components but i cant figure out how and couldnt find any help我现在想使用散点图矩阵来可视化前 4 个 PCA 组件,但我无法弄清楚如何并且找不到任何帮助

Run plot(housing.pca$x[,1:4]) for the first 4 principal components.对前 4 个主成分运行plot(housing.pca$x[,1:4])

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM