我正在查看此链接http://strata.uga.edu/8370/lecturenotes/principalComponents.html它说
在解释主成分时,了解原始变量与主成分的相关性通常很有用。变量的相关性和主成分是
在哪里是个-th 在主成分上的可变主成分权重和是个-th 主成分分数,我不确定是什么是。
我在下面的 iris 数据集上做了一个简单的 PCA,并想计算萼片宽度和长度与 PC 分数 1 和 PC 分数 2 的相关性,但是什么是?
这是主成分得分的方差。我在VarofSCores
下面的对象中有它。在那个链接中,作者说是分数的 varcov 矩阵,所以如果是对角线那么这与我在 中的值相同VarOfSCores
。
data(iris)
names(iris)
dat = data.frame(iris$Sepal.Width, iris$Sepal.Length)
pca= prcomp(dat)
PC = pca$rotation
VarOfScores = pca$sd^2
scores = pca$x
#correlation of sepal width to score 1
sqrt(PC[1,1]^2* VarOfScores[1]/?? )
#correlation of sepal width to score 2
sqrt(PC[1,2]^2* VarOfScores[2]/?? )
#correlation of sepal LENGTH to score 1
sqrt(PC[2,1]^2* VarOfScores[1]/?? )
#correlation of sepal LENGTH to score 2
sqrt(PC[2,2]^2* VarOfScores[2]/?? )
另外-为什么作者说“加载”而不是“主要组件”。特征向量是“主要成分”而不是“载荷”,特征向量的数据时间是“分数”。我认为这是一个糟糕的术语。请参阅此处 http://www.cs.princeton.edu/courses/archive/spr08/cos424/scribe_notes/0424.pdf其中作者在第 4 页“V”是主要成分。