Principal component score (source code)

= Principal component score
{title2=$z_{ij}=q_j^T(x_i-\bar x)$}

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.