Principal component analysis finds orthogonal directions of greatest sample variance. Its first loading vector is a unit eigenvector corresponding to the largest eigenvalue of the sample covariance matrix.
Regress a response on selected principal component scores of centered predictors. If is a singular value decomposition and the first positive-singular-value components are retained, the retained score matrix is and the fitted coefficient in predictor coordinates is . The fitted centered response is : this follows by applying the least-squares normal equations to the orthogonal score columns. Truncating small singular directions limits variance amplification, but directions of large predictor variance need not be those best predicting the response; select using prediction assessment rather than explained predictor variance alone.
A scree plot graphs ordered covariance or correlation eigenvalues against component number. A transition from a steep decline to a flatter tail suggests a dimension, but this is a diagnostic rather than a proof of the number of latent factors. In factor analysis, it should be combined with model fit, substantive interpretation and uncertainty assessment.
Two conventions occur for principal-component loadings: the unit eigenvector defining a principal component, and the scaled vector . For principal component analysis on a correlation matrix, the entries of the latter are the correlations between each standardized variable and the component scaled to variance one. Indeed, and . Thus , whereas ; reporting the convention avoids confusing component directions with correlations.
A principal component is the projection of centered data onto a unit eigenvector of its covariance matrix. Ordering the components by their eigenvalues orders their variances. Repeated eigenvalues allow any orthonormal basis of the corresponding eigenspace.
A score is an observation's coordinate along a principal component direction. Center an observation by the fitted sample mean, apply the fitted variable scaling when using principal component analysis on a correlation matrix, then take its inner product with the unit principal component loading vector. New observations must use the training center and scaling. The score variance equals the corresponding eigenvalue when the covariance normalization is consistent.
A population principal component explains the displayed fraction of total variance. The first components explain . Comparing covariance and correlation analyses requires different denominators: the original variance sum for the former and the number of nonconstant standardized variables for the latter.
For positive marginal variances, standardizing each variable to variance one converts covariance-based PCA on into correlation-based PCA on . This makes the analysis insensitive to the original measurement units but changes the optimization criterion. Standardization gives small-variance variables the same marginal weight as large-variance variables; it is a modelling choice, not an automatic improvement.
The population principal components are centered linear compounds along an orthonormal eigenbasis of the covariance matrix, ordered by decreasing eigenvalue. They are uncorrelated and have variances . Each successive direction maximizes variance subject to unit length and orthogonality to earlier directions. Uncorrelatedness does not imply independence unless additional distributional assumptions hold.
Let the columns of a centered design matrix be variables and write by the spectral theorem for real symmetric matrices. The columns of are the sample principal-component score vectors. They satisfy , so distinct score vectors have zero sample covariance and has sample variance under the divisor- convention.
When , the normalized sample principal component has Euclidean norm one. The vectors form an orthonormal set spanning the column space of a full-column-rank centered design matrix.

Ancestors (7)

  1. Statistical learning
  2. Statistical modelling
  3. Statistical model
  4. Probability and statistics
  5. Area of mathematics
  6. Mathematics
  7. Home

Synonyms (1)

Discussion (0)

New discussion

There are no discussions about this article yet.

Articles by others on the same topic (1)

Given a bunch of points in dimensions, PCA maps those points to a new dimensional space with .
is a hyperparameter, and are common choices when doing dataset exploration, as they can be easily visualized on a planar plot.
The mapping is done by projecting all points to a dimensional hyperplane. PCA is an algorithm for choosing this hyperplane and the coordinate system within this hyperplane.
The hyperplane choice is done as follows:
  • the hyperplane will have origin at the mean point
  • the first axis is picked along the direction of greatest variance, i.e. where points are the most spread out.
    Intuitively, if we pick an axis of small variation, that would be bad, because all the points are very close to one another on that axis, so it doesn't contain as much information that helps us differentiate the points.
  • then we pick a second axis, orthogonal to the first one, and on the direction of second largest variance
  • and so on until orthogonal axes are taken
www.sartorius.com/en/knowledge/science-snippets/what-is-principal-component-analysis-pca-and-how-it-is-used-507186 provides an OK-ish example with a concrete context. In there, each point is a country, and the input data is the consumption of different kinds of foods per year, e.g.:
  • flour
  • dry codfish
  • olive oil
  • sausage
so in this example, we would have input points in 4D.
The question is then: we want to be able to identify the country by what they eat.
Suppose that every country consumes the same amount of flour every year. Then, that number doesn't tell us much about which country each point represents (has the least variance), and the first PCA axes would basically never point anywhere near that direction.
Another cool thing is that PCA seems to automatically account for linear dependencies in the data, so it skips selecting highly correlated axes multiple times. For example, suppose that dry codfish and olive oil consumption are very high in Portugal and Spain, but very low in Germany and Poland. Therefore, the variation is very high in those two parameters, and contains a lot of information.
However, suppose that dry codfish consumption is also directly proportional to olive oil consumption. Because of this, it would be kind of wasteful if we selected:
since the information about codfish already tells us the olive oil. PCA apparently recognizes this, and instead picks the first axis at a 45 degree angle to both dry codfish and olive oil, and then moves on to something else for the second axis.
We can see that much like the rest of machine learning, PCA can be seen as a form of compression.