Skip to content

Latest commit

 

History

History
70 lines (33 loc) · 1.2 KB

File metadata and controls

70 lines (33 loc) · 1.2 KB

Home > @josh-brown/vector > pca

pca() function

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>;

Parameters

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:

PrincipalComponentAnalysis<S>