mlpack  master
Public Member Functions | Private Attributes | List of all members
mlpack::pca::RandomizedSVDPolicy Class Reference

Implementation of the randomized SVD policy. More...

Public Member Functions

 RandomizedSVDPolicy (const size_t iteratedPower=0, const size_t maxIterations=2)
 Use randomized SVD method to perform the principal components analysis (PCA). More...
 
void Apply (const arma::mat &data, const arma::mat &centeredData, arma::mat &transformedData, arma::vec &eigVal, arma::mat &eigvec, const size_t rank)
 Apply Principal Component Analysis to the provided data set using the randomized SVD. More...
 
size_t IteratedPower () const
 Get the size of the normalized power iterations. More...
 
size_t & IteratedPower ()
 Modify the size of the normalized power iterations. More...
 
size_t MaxIterations () const
 Get the number of iterations for the power method. More...
 
size_t & MaxIterations ()
 Modify the number of iterations for the power method. More...
 

Private Attributes

size_t iteratedPower
 Locally stored size of the normalized power iterations. More...
 
size_t maxIterations
 Locally stored number of iterations for the power method. More...
 

Detailed Description

Implementation of the randomized SVD policy.

Definition at line 27 of file randomized_svd_method.hpp.

Constructor & Destructor Documentation

mlpack::pca::RandomizedSVDPolicy::RandomizedSVDPolicy ( const size_t  iteratedPower = 0,
const size_t  maxIterations = 2 
)
inline

Use randomized SVD method to perform the principal components analysis (PCA).

Parameters
iteratedPowerSize of the normalized power iterations (Default: rank + 2).
maxIterationsNumber of iterations for the power method (Default: 2).

Definition at line 39 of file randomized_svd_method.hpp.

Member Function Documentation

void mlpack::pca::RandomizedSVDPolicy::Apply ( const arma::mat &  data,
const arma::mat &  centeredData,
arma::mat &  transformedData,
arma::vec &  eigVal,
arma::mat &  eigvec,
const size_t  rank 
)
inline

Apply Principal Component Analysis to the provided data set using the randomized SVD.

Parameters
dataData matrix.
centeredDataCentered data matrix.
transformedDataMatrix to put results of PCA into.
eigValVector to put eigenvalues into.
eigvecMatrix to put eigenvectors (loadings) into.
rankRank of the decomposition.

Definition at line 58 of file randomized_svd_method.hpp.

References mlpack::svd::RandomizedSVD::Apply(), iteratedPower, and maxIterations.

size_t mlpack::pca::RandomizedSVDPolicy::IteratedPower ( ) const
inline

Get the size of the normalized power iterations.

Definition at line 82 of file randomized_svd_method.hpp.

References iteratedPower.

size_t& mlpack::pca::RandomizedSVDPolicy::IteratedPower ( )
inline

Modify the size of the normalized power iterations.

Definition at line 84 of file randomized_svd_method.hpp.

References iteratedPower.

size_t mlpack::pca::RandomizedSVDPolicy::MaxIterations ( ) const
inline

Get the number of iterations for the power method.

Definition at line 87 of file randomized_svd_method.hpp.

References maxIterations.

size_t& mlpack::pca::RandomizedSVDPolicy::MaxIterations ( )
inline

Modify the number of iterations for the power method.

Definition at line 89 of file randomized_svd_method.hpp.

References maxIterations.

Member Data Documentation

size_t mlpack::pca::RandomizedSVDPolicy::iteratedPower
private

Locally stored size of the normalized power iterations.

Definition at line 93 of file randomized_svd_method.hpp.

Referenced by Apply(), and IteratedPower().

size_t mlpack::pca::RandomizedSVDPolicy::maxIterations
private

Locally stored number of iterations for the power method.

Definition at line 96 of file randomized_svd_method.hpp.

Referenced by Apply(), and MaxIterations().


The documentation for this class was generated from the following file: