|
| template<typename MatType > |
| void | Fit (const MatType &input) |
| | Function to fit features, to find out the min max and scale. More...
|
| |
| template<typename MatType > |
| void | Transform (const MatType &input, MatType &output) |
| | Function to scale features. More...
|
| |
| template<typename MatType > |
| void | InverseTransform (const MatType &input, MatType &output) |
| | Function to retrieve original dataset. More...
|
| |
|
const arma::vec & | ItemMean () const |
| | Get the Mean row vector.
|
| |
|
const arma::vec & | ItemMin () const |
| | Get the Min row vector.
|
| |
|
const arma::vec & | ItemMax () const |
| | Get the Max row vector.
|
| |
|
const arma::vec & | Scale () const |
| | Get the Scale row vector.
|
| |
|
template<typename Archive > |
| void | serialize (Archive &ar, const uint32_t) |
| |
A simple Mean Normalization class.
Given an input dataset this class helps you to normalize each feature.
[z = x - average(x) / (max(x) - min(x))]
where x is an original value,z is the normalized value.
arma::mat input;
Load(
"train.csv", input);
arma::mat output;
MeanNormalization scale;
scale.Fit(input)
scale.Transform(input, output);
scale.InverseTransform(output, input);