Statistics::PCA Function

Overload List

#SignatureDescription
1void PCA(TMtx *CovMat, TMtx *PC, TVec *EigenVec, TVec *VarPct = null);Performs a principal component analysis (PCA).
2void PCA(TMtx *Data, TMtx *PC, TMtx *ZScores, TVec *EigenVec, TVec *VarPct = null, const TPCAMode PCAMode = TPCAMode::PCACorrMat);Perform a PCA on Data matrix, where Data columns are variables and rows are the observables.

Overload 1: void PCA(TMtx *CovMat, TMtx *PC, TVec *EigenVec, TVec *VarPct = null);

Performs a principal component analysis (PCA).

#NameTypeDescription
1CovMatTMtx *
2PCTMtx *
3EigenVecTVec *
4VarPct = nullTVec *
Remarks:

Perform a PCA by using the original data covariance matrix CovMat. Return the principal components in PC matrix, eigenvalues of the covariance matrix (variances) in vector EigenVec and (optional) the percentage of total variance in vector VarPct. The PC, EigenVec and VarPct dimensions are adjusted automatically.

Declared in Dew::Stats::Units::Statistics · Dew.Stats/Units.Statistics.h · Cross-compiler

Overload 2: void PCA(TMtx *Data, TMtx *PC, TMtx *ZScores, TVec *EigenVec, TVec *VarPct = null, const TPCAMode PCAMode = TPCAMode::PCACorrMat);

Perform a PCA on Data matrix, where Data columns are variables and rows are the observables.

#NameTypeDescription
1DataTMtx *
2PCTMtx *
3ZScoresTMtx *
4EigenVecTVec *
5VarPct = nullTVec *
6PCAMode = TPCAMode::PCACorrMatconst TPCAMode
Remarks:

The (optional) PCAMode parameter defines whether the analysis should be run on correlation or covariance matrix. PCA procedure returns the principal components in matrix PC, the Z-scores (data, transformed in the PC space) in ZScores, the eigenvalues of the covariance matrix (variances) in the EigenVec vector and (optional) the percentage of total variance in VarPct vector. The PC, ZScores, EigenVec and VarPct dimensions are adjusted automatically.

See Also: Statistics::PCAResiduals, Statistics::BartlettTest
Declared in Dew::Stats::Units::Statistics · Dew.Stats/Units.Statistics.h · Cross-compiler