12#ifndef MLPACK_CORE_DATA_ZCA_WHITENING_SCALE_HPP
13#define MLPACK_CORE_DATA_ZCA_WHITENING_SCALE_HPP
62 template<
typename MatType>
63 void Fit(
const MatType& input)
74 template<
typename MatType>
75 void Transform(
const MatType& input, MatType& output)
87 template<
typename MatType>
90 output = inv(pca.
EigenVectors()) * arma::diagmat(arma::sqrt(
92 output = (output.each_col() + pca.
ItemMean());
104 template<
typename Archive>
107 ar & BOOST_SERIALIZATION_NVP(pca);
A simple PCAWhitening class.
void Fit(const MatType &input)
Function to fit features, to find out the min max and scale.
const arma::mat & EigenVectors() const
Get the eigenvector.
const arma::vec & ItemMean() const
Get the mean row vector.
void Transform(const MatType &input, MatType &output)
Function for PCA whitening.
const double & Epsilon() const
Get the regularization parameter.
const arma::vec & EigenValues() const
Get the eigenvalues vector.
A simple ZCAWhitening class.
void Fit(const MatType &input)
Function to fit features, to find out the min max and scale.
const arma::mat & EigenVectors() const
Get the eigenvector.
const arma::vec & ItemMean() const
Get the mean row vector.
void Transform(const MatType &input, MatType &output)
Function for ZCA whitening.
ZCAWhitening(double eps=0.00005)
A constructor to set the regularization parameter.
void serialize(Archive &ar, const unsigned int)
double Epsilon() const
Get the regularization parameter.
void InverseTransform(const MatType &input, MatType &output)
Function to retrieve original dataset.
const arma::vec & EigenValues() const
Get the eigenvalues vector.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.