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>
89 void InverseTransform(
const MatType& input, MatType& output);
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)
size_t & ScalerType()
Modify the Scaler type.
Definition: scaling_model.hpp:77
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
A simple Mean Normalization class.
Definition: mean_normalization.hpp:46
~ScalingModel()
Clean up memory.
Definition: scaling_model_impl.hpp:156
ScalingModel(const int minvalue=0, const int maxvalue=1, double epsilonvalue=0.00005)
Create an object.
Definition: scaling_model_impl.hpp:22
ScalingModel & operator=(const ScalingModel &other)
Copy assignment operator.
Definition: scaling_model_impl.hpp:87
A simple PCAWhitening class.
Definition: pca_whitening.hpp:47
void Transform(const MatType &input, MatType &output)
Transform to scale features.
Definition: scaling_model_impl.hpp:208
size_t ScalerType() const
Get the Scaler type.
Definition: scaling_model.hpp:75
The model to save to disk.
Definition: scaling_model.hpp:29
A simple MaxAbs Scaler class.
Definition: max_abs_scaler.hpp:46
Include all of the base components required to write mlpack methods, and the main mlpack Doxygen docu...
A simple Standard Scaler class.
Definition: standard_scaler.hpp:47
#define CEREAL_POINTER(T)
Cereal does not support the serialization of raw pointer.
Definition: pointer_wrapper.hpp:96
A simple MinMax Scaler class.
Definition: min_max_scaler.hpp:48
A simple ZCAWhitening class.
Definition: zca_whitening.hpp:47
void serialize(Archive &ar, const uint32_t)
Serialize the model.
Definition: scaling_model.hpp:93