what are scores in PCA

7 次查看(过去 30 天)
Nikos Mp
Nikos Mp 2017-8-24
回答: TED MOSBY 2025-3-25
1.Should i take the scores as the new projected values of the previous values? 2.And if i choose some columns of PCA to delete in order to keep the columns with the best variance for the component then i should delete these columns from the scores? OR the columns selection should be done to the original dataset?

回答(1 个)

TED MOSBY
TED MOSBY 2025-3-25
Hi Nikos,
In MATLAB, when you perform Principal Component Analysis using the [pca] function, you call:
[coeff, score, latent, tsquared, explained, mu] = pca(X);
Here:
  • X is your data matrix (rows = observations, columns = variables).
  • coeff contains the principal component loadings (each column is a principal component).
  • score contains the principal component scores. Each column of score corresponds to the coordinates of the data in one principal component direction.
  • latent are the eigenvalues (the variance explained by each principal component).
  • explained is the percentage of variance explained by each principal component.
  • mu is the estimated mean of each variable in X.
So, the scores (score) are your original data expressed (or projected) in the new coordinate system of principal components.
"And if i choose some columns of PCA to delete in order to keep the columns with the best variance for the component then i should delete these columns from the scores? OR the columns selection should be done to the original dataset?"
The usual approach to PCA-based dimensionality reduction is to keep your original data as is, run PCA, and then just truncate the columns of the scores (the new coordinate space) to reduce dimension. This does not remove columns from X itself. You only keep the top principal components in score.
If you specifically want to eliminate certain original features, do it before running PCA (that’s feature selection). After that, you run PCA on the remaining features.
Hope this helps!

类别

Help CenterFile Exchange 中查找有关 Dimensionality Reduction and Feature Extraction 的更多信息

标签

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by