mlpack
Public Member Functions | List of all members
mlpack::pca::RandomizedBlockKrylovSVDPolicy Class Reference

Implementation of the randomized block krylov SVD policy. More...

#include <randomized_block_krylov_method.hpp>

Public Member Functions

 RandomizedBlockKrylovSVDPolicy (const size_t maxIterations=2, const size_t blockSize=0)
 Use randomized block krylov 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 block krylov SVD method. More...
 
size_t MaxIterations () const
 Get the number of iterations for the power method.
 
size_t & MaxIterations ()
 Modify the number of iterations for the power method.
 
size_t BlockSize () const
 Get the block size.
 
size_t & BlockSize ()
 Modify the block size.
 

Detailed Description

Implementation of the randomized block krylov SVD policy.

Constructor & Destructor Documentation

◆ RandomizedBlockKrylovSVDPolicy()

mlpack::pca::RandomizedBlockKrylovSVDPolicy::RandomizedBlockKrylovSVDPolicy ( const size_t  maxIterations = 2,
const size_t  blockSize = 0 
)
inline

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

Parameters
maxIterationsNumber of iterations for the power method (Default: 2).
blockSizeThe block size, must be >= rank (Default: rank + 10).

Member Function Documentation

◆ Apply()

void mlpack::pca::RandomizedBlockKrylovSVDPolicy::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 block krylov SVD method.

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.

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