12 #ifndef MLPACK_CORE_DATA_SCALING_MODEL_HPP 13 #define MLPACK_CORE_DATA_SCALING_MODEL_HPP 56 ScalingModel(
const int minvalue = 0,
const int maxvalue = 1,
57 double epsilonvalue = 0.00005);
80 template<
typename MatType>
81 void Transform(
const MatType& input, MatType& output);
84 template<
typename MatType>
85 void Fit(
const MatType& input);
88 template<
typename MatType>
92 template<
typename Archive>
95 if (cereal::is_loading<Archive>())
104 delete standardscale;
112 standardscale = NULL;
118 ar(CEREAL_NVP(scalerType));
119 ar(CEREAL_NVP(epsilon));
120 ar(CEREAL_NVP(minValue));
121 ar(CEREAL_NVP(maxValue));
122 if (scalerType == ScalerTypes::MIN_MAX_SCALER)
124 else if (scalerType == ScalerTypes::MEAN_NORMALIZATION)
126 else if (scalerType == ScalerTypes::MAX_ABS_SCALER)
128 else if (scalerType == ScalerTypes::STANDARD_SCALER)
130 else if (scalerType == ScalerTypes::PCA_WHITENING)
132 else if (scalerType == ScalerTypes::ZCA_WHITENING)
141 #include "scaling_model_impl.hpp" size_t & ScalerType()
Modify the Scaler type.
ScalingModel(const int minvalue=0, const int maxvalue=1, double epsilonvalue=0.00005)
Create an object.
Linear algebra utility functions, generally performed on matrices or vectors.
void Transform(const MatType &input, MatType &output)
Transform to scale features.
A simple Mean Normalization class.
void Fit(const MatType &input)
A simple PCAWhitening class.
~ScalingModel()
Clean up memory.
The model to save to disk.
A simple MaxAbs Scaler class.
Include all of the base components required to write mlpack methods, and the main mlpack Doxygen docu...
ScalingModel & operator=(const ScalingModel &other)
Copy assignment operator.
A simple Standard Scaler class.
size_t ScalerType() const
Get the Scaler type.
void InverseTransform(const MatType &input, MatType &output)
#define CEREAL_POINTER(T)
Cereal does not support the serialization of raw pointer.
void serialize(Archive &ar, const uint32_t)
Serialize the model.
A simple MinMax Scaler class.
A simple ZCAWhitening class.