Back to FabImage Library website
You are here: Start » Function Reference » Data Classification » Principal Component Analysis » NormalizeMatrixData

NormalizeMatrixData
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationPro |
Treats Matrix as a data frame, where examples are in rows while columns represent features, and normalizes the data by subtracting mean from each column and dividing it by its standard deviation.
Syntax
C++
C#
void fil::NormalizeMatrixData ( const fil::Matrix& inMatrix, ftl::Optional<const fil::Matrix&> inMeansVector, ftl::Optional<const fil::Matrix&> inStandardDeviationsVector, fil::Matrix& outNormalizedMatrix, fil::Matrix& outMeansVector, fil::Matrix& outStandardDeviationsVector )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
![]() |
inMatrix | const Matrix& | Input data frame. | |
![]() |
inMeansVector | Optional<const Matrix&> | NIL | If provided, will be used in normalization of inMatrix. |
![]() |
inStandardDeviationsVector | Optional<const Matrix&> | NIL | If provided, will be used in normalization of inMatrix. |
![]() |
outNormalizedMatrix | Matrix& | Resulting normalized matrix. | |
![]() |
outMeansVector | Matrix& | Resulting Means vector - copy of inMeansVector, or calculated Means, if inMeansVector was set NIL. | |
![]() |
outStandardDeviationsVector | Matrix& | Resulting StdDevs vector - copy of inStandardDeviationsVector, or calculated Means, if inStandardDeviationsVector was set NIL. |
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Incorrect matrix dimensions in NormalizeData. |
DomainError | One can provide both Means and StdDevs vector or none of them. |