You are here: Start » AVL.NET » Function Reference » Data Classification » Principal Component Analysis » AVL.CreatePCATransform

AVL.CreatePCATransform

Performs the Principal Component Analysis (PCA) on provided data, creates the feature vector and normalization coefficients (mean and standard deviation of variables).

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void CreatePCATransform
(
	AvlNet.Matrix inMatrix,
	int inDimensions,
	float? inVarianceToLeave,
	AvlNet.PCAModel outPCAModel,
	AvlNet.Matrix outTransformedMatrix,
	AvlNet.Matrix diagCovarianceMatrix,
	AvlNet.Matrix diagNormalizedData,
	IList<int> diagUsedFeatureIndices
)

Parameters

Name Type Range Default Description
inMatrixAvlNet.MatrixInput data, where variables are in column, and examples are in rows.
inDimensionsint<1, INF>How many data dimensions (variables) to be left in transformed data.
inVarianceToLeavefloat?<0.0f, 1.0f>0.95fHow many of input data variance should be left in transformed data; overrides inDimensions input. Default value: 0.95f.
outPCAModelAvlNet.PCAModelResulting PCA model.
outTransformedMatrixAvlNet.MatrixTransformed inMatrix with reduced dimensionality.
diagCovarianceMatrixAvlNet.MatrixCovariance matrix of input data.
diagNormalizedDataAvlNet.MatrixInput data after normalization: scaling and centering.
diagUsedFeatureIndicesSystem.Collections.Generic.IList<int>Indices of columns in inMatrix, which were used as Principal Components.

Errors

List of possible exceptions:

Error type Description
DomainError Cannot conduct PCA on empty matrix in CreatePCATransform.
DomainError Cannot conduct principal component analysis for 1-row data set in CreatePCATransform.
DomainError Cannot reduce data to less than 1 dimension in CreatePCATransform.
DomainError Could not compute eigenvalues and/or eigenvectors in CreatePCATransform.
DomainError inDimensions has to be lesser then inMatrix column count in PCA filter in CreatePCATransform.
DomainError The process did not converge in CreatePCATransform.
DomainError The provided data did not satisfy the prerequisites in CreatePCATransform.

Function Overrides

See also