mzwiki Mass spectrometry
knowledge commons by UniMZ
Guides & terminologyAll Guides
Terminology

Principal component analysis

An unsupervised linear summary that orders orthogonal directions by variation in a specified, preprocessed data matrix.

Definition

Principal component analysis (PCA) forms linear combinations of variables, ordered to capture decreasing variance with mutually orthogonal component directions. This entry uses mean-centered PCA, which describes variation around the column means. The input transformation and optional scaling define which variation counts. PCA is unsupervised: ordinary PCA does not use condition labels to find directions. [1]

A simple example

Constructed centered coordinates: A = [−1, −1, 1, 1] and B = [−10, 10, −10, 10] have zero covariance. Their sample variances are 4/3 and 400/3. Without scaling, the first component follows B and explains 100/101 ≈ 99.01% of total variance. After unit-variance scaling, both directions have variance 1; each component explains 50%, and the axes within their plane are not unique.

Common confusion

Scores are sample coordinates; in the convention used here, each component's loadings form a unit-length vector of variable coefficients defining its direction. Other software may rescale the displayed loadings. Simultaneous sign reversal of scores and loadings is harmless. R documents these definitions and its arbitrary component signs. [2]

High explained variance is not high biological relevance. Large loadings do not constitute significance tests, and plotted separation is not a validated prediction result. Uncorrelated component scores need not be statistically independent.

Check your understanding

Does changing the sign of PC1 change the reconstructed observations?

No, if its scores and loadings are both reversed. Their contribution to reconstruction is unchanged.

Use it in a Guide

References & further reading

  1. NIST/SEMATECH e-Handbook of Statistical Methods. 6.5.5: Principal Components.

    Official explanation of a reduced linear representation and variance-maximizing component directions. Its standardized-data presentation is not treated as a requirement that every PCA use unit-variance scaling.

  2. R stats package. prcomp: Principal Components Analysis.

    Official documentation for centering, optional unit-variance scaling, singular-value decomposition, score and loading definitions, sample-variance divisor, and arbitrary component signs. The constructed example is calculated independently.

Help make this article clearer.Edit this article →Suggest a correction →