我在sklearn中读到了PCA,特别是特性和组件之间的关系。我特别感兴趣的是识别与几个主要组件相关的特性重要性。然而,我发现一些帖子说了不同的事情
例如,this post中的3个答案讨论了特征向量和载荷。尤其是mentioned,pca.components_.T * np.sqrt(pca.explained_variance_)
显示特征的组件加载。为什么这里使用sqrt
?为什么是这个产品
但是,在this answer中指出abs(pca.components_)
给出了每个组件中的特性重要性。这似乎与上面所说的相矛盾,是吗This blog post还表示pca.components_
是每个特性的组件加载
此外,我还不明白this是如何回答这个问题的:"I think what you call the "loadings" is the result of the projection for each sample into the vector space spanned by the components. Those can be obtained by calling pca.transform(X_train) after calling pca.fit(X_train)."
但这是不正确的:载荷与主成分上每个特征的系数有关,而不是样本。同意吗
希望能澄清一下
目前没有回答
相关问题 更多 >
编程相关推荐