A simple PCAWhitening class.
More...
#include <pca_whitening.hpp>
|
| PCAWhitening (double eps=0.00005) |
| A constructor to set the regularization parameter. More...
|
|
template<typename MatType > |
void | Fit (const MatType &input) |
| Function to fit features, to find out the min max and scale. More...
|
|
template<typename MatType > |
void | Transform (const MatType &input, MatType &output) |
| Function for PCA whitening. More...
|
|
template<typename MatType > |
void | InverseTransform (const MatType &input, MatType &output) |
| Function to retrieve original dataset. More...
|
|
const arma::vec & | ItemMean () const |
| Get the mean row vector.
|
|
const arma::vec & | EigenValues () const |
| Get the eigenvalues vector.
|
|
const arma::mat & | EigenVectors () const |
| Get the eigenvector.
|
|
const double & | Epsilon () const |
| Get the regularization parameter.
|
|
template<typename Archive > |
void | serialize (Archive &ar, const uint32_t) |
|
A simple PCAWhitening 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;
scale.Fit(input)
scale.Transform(input, output);
scale.InverseTransform(output, input);
◆ PCAWhitening()
mlpack::data::PCAWhitening::PCAWhitening |
( |
double |
eps = 0.00005 | ) |
|
|
inline |
A constructor to set the regularization parameter.
- Parameters
-
eps | Regularization parameter. |
◆ Fit()
template<typename MatType >
void mlpack::data::PCAWhitening::Fit |
( |
const MatType & |
input | ) |
|
|
inline |
Function to fit features, to find out the min max and scale.
- Parameters
-
◆ InverseTransform()
template<typename MatType >
void mlpack::data::PCAWhitening::InverseTransform |
( |
const MatType & |
input, |
|
|
MatType & |
output |
|
) |
| |
|
inline |
Function to retrieve original dataset.
- Parameters
-
input | Scaled dataset. |
output | Output matrix with original Dataset. |
◆ Transform()
template<typename MatType >
void mlpack::data::PCAWhitening::Transform |
( |
const MatType & |
input, |
|
|
MatType & |
output |
|
) |
| |
|
inline |
Function for PCA whitening.
- Parameters
-
input | Dataset to scale features. |
output | Output matrix with whitened features. |
The documentation for this class was generated from the following file: