Back to Adaptive Vision Library websiteYou are here:
Start »
Function Reference »
Principal Component Analysis »
NormalizeMatrixData
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 avl::NormalizeMatrixData
(
const avl::Matrix& inMatrix,
const atl::Optional<avl::Matrix&> inMeansVector,
const atl::Optional<avl::Matrix&> inStandardDeviationsVector,
avl::Matrix& outNormalizedMatrix,
avl::Matrix& outMeansVector,
avl::Matrix& outStandardDeviationsVector
)
void NormalizeMatrixData
(
Matrix inMatrix,
Matrix? inMeansVector,
Matrix? inStandardDeviationsVector,
out Matrix outNormalizedMatrix,
out Matrix outMeansVector,
out Matrix outStandardDeviationsVector
)
Parameters
|
Name |
Type |
Default |
Description |
|
inMatrix |
const Matrix& |
|
Input data frame. |
|
inMeansVector |
const Optional<Matrix&> |
NIL |
If provided, will be used in normalization of inMatrix. |
|
inStandardDeviationsVector |
const Optional<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
Error type |
Description |
DomainError |
Incorrect matrix dimensions in NormalizeData. |
DomainError |
One can provide both Means and StdDevs vector or none of them. |