ZCAWhitening Class Reference

A simple ZCAWhitening class. More...

Public Member Functions

 ZCAWhitening (double eps=0.00005)
 A constructor to set the regularization parameter. More...

const arma::vec & EigenValues () const
 Get the eigenvalues vector. More...

const arma::mat & EigenVectors () const
 Get the eigenvector. More...

double Epsilon () const
 Get the regularization parameter. More...

void Fit (const MatType &input)
 Function to fit features, to find out the min max and scale. More...

void InverseTransform (const MatType &input, MatType &output)
 Function to retrieve original dataset. More...

const arma::vec & ItemMean () const
 Get the mean row vector. More...

void serialize (Archive &ar, const unsigned int)
void Transform (const MatType &input, MatType &output)
 Function for ZCA whitening. More...


Detailed Description

A simple ZCAWhitening class.

Whitens a matrix using the eigendecomposition of the covariance matrix. Whitening means the covariance matrix of the result is the identity matrix.

For whitening related formula and more info, check the link below. http://ufldl.stanford.edu/tutorial/unsupervised/PCAWhitening/

arma::mat input;
Load("train.csv", input);
arma::mat output;
// Fit the features.
// Scale the features.
scale.Transform(input, output);
// Retransform the input.
scale.InverseTransform(output, input);

Definition at line 47 of file zca_whitening.hpp.

Constructor & Destructor Documentation

◆ ZCAWhitening()

ZCAWhitening ( double  eps = 0.00005)

A constructor to set the regularization parameter.

epsRegularization parameter.

Definition at line 55 of file zca_whitening.hpp.

Member Function Documentation

◆ EigenValues()

const arma::vec& EigenValues ( ) const

Get the eigenvalues vector.

Definition at line 98 of file zca_whitening.hpp.

References PCAWhitening::EigenValues().

◆ EigenVectors()

const arma::mat& EigenVectors ( ) const

Get the eigenvector.

Definition at line 100 of file zca_whitening.hpp.

References PCAWhitening::EigenVectors().

◆ Epsilon()

double Epsilon ( ) const

Get the regularization parameter.

Definition at line 102 of file zca_whitening.hpp.

References PCAWhitening::Epsilon().

◆ Fit()

void Fit ( const MatType &  input)

Function to fit features, to find out the min max and scale.

inputDataset to fit.

Definition at line 63 of file zca_whitening.hpp.

References PCAWhitening::Fit().

◆ InverseTransform()

void InverseTransform ( const MatType &  input,
MatType &  output 

Function to retrieve original dataset.

inputScaled dataset.
outputOutput matrix with original Dataset.

Definition at line 88 of file zca_whitening.hpp.

References PCAWhitening::EigenValues(), PCAWhitening::EigenVectors(), and PCAWhitening::ItemMean().

◆ ItemMean()

const arma::vec& ItemMean ( ) const

Get the mean row vector.

Definition at line 96 of file zca_whitening.hpp.

References PCAWhitening::ItemMean().

◆ serialize()

void serialize ( Archive &  ar,
const unsigned  int 

Definition at line 105 of file zca_whitening.hpp.

◆ Transform()

void Transform ( const MatType &  input,
MatType &  output 

Function for ZCA whitening.

inputDataset to scale features.
outputOutput matrix with whitened features.

Definition at line 75 of file zca_whitening.hpp.

References PCAWhitening::EigenVectors(), and PCAWhitening::Transform().

The documentation for this class was generated from the following file:
  • /home/jenkins-mlpack/mlpack.org/_src/mlpack-3.4.2/src/mlpack/core/data/scaler_methods/zca_whitening.hpp