12#ifndef MLPACK_CORE_DATA_SCALING_MODEL_HPP
13#define MLPACK_CORE_DATA_SCALING_MODEL_HPP
57 double epsilonvalue = 0.00005);
77 template<
typename MatType>
78 void Transform(
const MatType& input, MatType& output);
81 template<
typename MatType>
82 void Fit(
const MatType& input);
85 template<
typename MatType>
89 template<
typename Archive>
92 if (Archive::is_loading::value)
101 delete standardscale;
109 standardscale = NULL;
115 ar & BOOST_SERIALIZATION_NVP(scalerType);
116 ar & BOOST_SERIALIZATION_NVP(epsilon);
117 ar & BOOST_SERIALIZATION_NVP(minValue);
118 ar & BOOST_SERIALIZATION_NVP(maxValue);
119 if (scalerType == ScalerTypes::MIN_MAX_SCALER)
120 ar & BOOST_SERIALIZATION_NVP(minmaxscale);
121 else if (scalerType == ScalerTypes::MEAN_NORMALIZATION)
122 ar & BOOST_SERIALIZATION_NVP(meanscale);
123 else if (scalerType == ScalerTypes::MAX_ABS_SCALER)
124 ar & BOOST_SERIALIZATION_NVP(maxabsscale);
125 else if (scalerType == ScalerTypes::STANDARD_SCALER)
126 ar & BOOST_SERIALIZATION_NVP(standardscale);
127 else if (scalerType == ScalerTypes::PCA_WHITENING)
128 ar & BOOST_SERIALIZATION_NVP(pcascale);
129 else if (scalerType == ScalerTypes::ZCA_WHITENING)
130 ar & BOOST_SERIALIZATION_NVP(zcascale);
138#include "scaling_model_impl.hpp"
A simple MaxAbs Scaler class.
A simple Mean Normalization class.
A simple MinMax Scaler class.
A simple PCAWhitening class.
The model to save to disk.
size_t ScalerType() const
Get the Scaler type.
void Fit(const MatType &input)
ScalingModel & operator=(const ScalingModel &other)
Copy assignment operator.
ScalingModel(const ScalingModel &other)
Copy constructor.
ScalingModel(const int minvalue=0, const int maxvalue=1, double epsilonvalue=0.00005)
Create an object.
void Transform(const MatType &input, MatType &output)
Transform to scale features.
~ScalingModel()
Clean up memory.
size_t & ScalerType()
Modify the Scaler type.
ScalingModel(ScalingModel &&other)
Move constructor.
void serialize(Archive &ar, const unsigned int)
Serialize the model.
void InverseTransform(const MatType &input, MatType &output)
A simple Standard Scaler class.
A simple ZCAWhitening class.
Include all of the base components required to write mlpack methods, and the main mlpack Doxygen docu...
Linear algebra utility functions, generally performed on matrices or vectors.