Back to Adaptive Vision Library website

You are here: Start » Function Reference » Matrix » ApplyPCATransformation

ApplyPCATransformation


Applies previously obtained PCA transformation coefficients to new data.

Syntax

void avl::ApplyPCATransformation
(
	const avl::Matrix& inMatrix,
	const avl::PCAModel& inPCAModel,
	avl::Matrix& outTransformedMatrix
)

Parameters

Name Type Default Description
inMatrix const Matrix& Input data with variables in columns and examples in rows.
inPCAModel const PCAModel& Previously created PCA model to apply to data provided in inMatrix.
outTransformedMatrix Matrix& Transformed inMatrix.

Errors

Error type Description
DomainError Malformed inPCAModel - MeanVector and StandardDeviationVector have to have the same length!
DomainError Malformed inPCAModel - MeanVector and StandardDeviationVector are not row-vectors!
DomainError PCAModel does not match - inMatrix column count does not match!
DomainError PCAModel does not match - StandardDeviationVector length is different then inMatrix column count!
DomainError PCAModel does not match - PCAFeatureVector dimensions does not correspond to inMatrix dimensions!