Home > @josh-brown/vector > pca
Conducts a principal component analysis of a matrix A, and returns A in a new basis corresponding to the principal components.
Signature:
export declare function pca<S>(A: Matrix<S>, useCorrelation?: boolean): PrincipalComponentAnalysis<S>;|
Parameter |
Type |
Description |
|---|---|---|
|
A |
Matrix<S> |
The matrix to analyze |
|
useCorrelation |
boolean |
(Optional) Whether to use correlation rather than covariance to determine principal components. Equivalently, whether to standardize rather than merely center the data. This option should be used if the variables in the data naturally fall on different scales. |
Returns: