A simple Standard Scaler class. More...
Public Member Functions | |
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 | InverseTransform (const MatType &input, MatType &output) |
Function to retrieve original dataset. More... | |
const arma::vec & | ItemMean () const |
Get the mean row vector. More... | |
const arma::vec & | ItemStdDev () const |
Get the standard deviation row vector. More... | |
template < typename Archive > | |
void | serialize (Archive &ar, const uint32_t) |
template < typename MatType > | |
void | Transform (const MatType &input, MatType &output) |
Function to scale features. More... | |
A simple Standard Scaler class.
Given an input dataset this class helps you to Standardize features by removing the mean and scaling to unit variance.
[z = (x - u) / s]
where u is the mean of the training samples and s is the standard deviation of the training samples.
Definition at line 47 of file standard_scaler.hpp.
|
inline |
Function to fit features, to find out the min max and scale.
input | Dataset to fit. |
Definition at line 56 of file standard_scaler.hpp.
|
inline |
Function to retrieve original dataset.
input | Scaled dataset. |
output | Output matrix with original Dataset. |
Definition at line 90 of file standard_scaler.hpp.
|
inline |
Get the mean row vector.
Definition at line 97 of file standard_scaler.hpp.
|
inline |
Get the standard deviation row vector.
Definition at line 99 of file standard_scaler.hpp.
|
inline |
Definition at line 102 of file standard_scaler.hpp.
|
inline |
Function to scale features.
input | Dataset to scale features. |
output | Output matrix with scaled features. |
Definition at line 72 of file standard_scaler.hpp.