开始使用免费开始使用

Calculating the proportion of variation explained

The proportion of variation and the cumulative proportion of variation explained by the leading PCs are widely used to determine the importance of the PCs and to decide the number of components to retain.

本练习是课程的一部分

Multivariate Probability Distributions in R

查看课程

练习说明

  • Using the pca.state object that contains the PCs of the state.x77 data, calculate the variance explained by each principal component.
  • Calculate the proportion of variance explained by each principal component.

交互式实操练习

通过完成这段示例代码来试试这个练习。

# Variance explained by each PC
pca.var <- ___$sdev^2  

# Proportion of variance explained by each PC
pca.pvar <- pca.var/sum(___) 
编辑并运行代码