CreatePCATransform
Performs the Principal Component Analysis (PCA) on provided data, creates the feature vector and normalization coefficients (mean and standard deviation of variables).
Syntax
C++
C#
Python
def CreatePCATransform( inMatrix: Matrix, outPCAModel: PCAModel, outTransformedMatrix: Matrix, /, *, inDimensions: int = 1, inVarianceToLeave: float | None = 0.95, diagCovarianceMatrix: Matrix | None = None, diagNormalizedData: Matrix | None = None ) -> diagUsedFeatureIndices: list[int]
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inMatrix | Matrix | Input data, where variables are in column, and examples are in rows. | ||
![]() |
inDimensions | int | 1 - ![]() |
1 | How many data dimensions (variables) to be left in transformed data. |
![]() |
inVarianceToLeave | float | None | 0.0 - 1.0 | 0.95 | How many of input data variance should be left in transformed data; overrides inDimensions input. |
![]() |
outPCAModel | PCAModel | Resulting PCA model. | ||
![]() |
outTransformedMatrix | Matrix | Transformed inMatrix with reduced dimensionality. | ||
![]() |
diagCovarianceMatrix | Matrix | None | None | Covariance matrix of input data. | |
![]() |
diagNormalizedData | Matrix | None | None | Input data after normalization: scaling and centering. | |
![]() |
diagUsedFeatureIndices | list[int] | Indices of columns in inMatrix, which were used as Principal Components. |




