Stats Master VCL
|
Performs Principle Component Analysis (PCA).
TMtxPCA = class(TMtxComponent);
Principal Components Analysis - PCA - is a data analysis tool that is usually used to reduce the dimensionality (number of variables) of a large number of interrelated variables, while retaining as much of the information (variation) as possible. PCA calculates an uncorrelated set of variables (factors or PCs). These factors are ordered so that the first few retain most of the variation present in all of the original variables.
The PCA procedure is reduced to an eigenvalue-eigenvector problem. PCA routines perform a PCA on either a correlation or a covariance matrix. Data matrix can be either "raw" data or pre-calculated correlation/covariance matrix.
How to use TMtxPCA component?
Results:
An example how to setup TMtxPCA component:
Uses StatTools, MtxVec, Statistics; procedure Example(MtxPCA1: TMtxPCA); begin // ... MtxPCA1.Data.SetIt(4,3,false,[1,2,3, 5,7,9, 1,11,13, 3,7,4]); MtxPCA1.PCAMode := PCARawData; // using data matrix to evaluate PCA MtxPCA1.Recalc; // force recalculation // ... end;
#include "StatTools.hpp" #include "Statistics.hpp" void __fastcall Example (TMtxPCA* MtxPCA1) { // ... MtxPCA1->Data->SetIt(4,3,false,OPENARRAY(double, (1,2,3, 5,7,9, 1,11,13, 3,7,4))); MtxPCA1->PCAMode = PCARawData; // using data matrix to evaluate PCA MtxPCA1->Recalc(); // trigger recalculation // ... }
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
|
What do you think about this topic? Send feedback!
|