14 #ifndef MLPACK_METHODS_PCA_DECOMPOSITION_POLICIES_RANDOMIZED_BLOCK_KRYLOV_HPP 15 #define MLPACK_METHODS_PCA_DECOMPOSITION_POLICIES_RANDOMIZED_BLOCK_KRYLOV_HPP 38 const size_t blockSize = 0) :
39 maxIterations(maxIterations),
57 const arma::mat& centeredData,
58 arma::mat& transformedData,
69 rsvd.
Apply(centeredData, eigvec, eigVal, v, rank);
74 eigVal %= eigVal / (data.n_cols - 1);
77 transformedData = arma::trans(eigvec) * centeredData;
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
void Apply(const arma::mat &data, arma::mat &u, arma::vec &s, arma::mat &v, const size_t rank)
Apply Principal Component Analysis to the provided data set using the randomized block krylov SVD...
Definition: randomized_block_krylov_svd.cpp:46
The core includes that mlpack expects; standard C++ includes and Armadillo.
size_t & BlockSize()
Modify the block size.
Definition: randomized_block_krylov_method.hpp:88
size_t MaxIterations() const
Get the number of iterations for the power method.
Definition: randomized_block_krylov_method.hpp:81
void Apply(const arma::mat &data, const arma::mat ¢eredData, 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 met...
Definition: randomized_block_krylov_method.hpp:56
Randomized block krylov SVD is a matrix factorization that is based on randomized matrix approximatio...
Definition: randomized_block_krylov_svd.hpp:58
RandomizedBlockKrylovSVDPolicy(const size_t maxIterations=2, const size_t blockSize=0)
Use randomized block krylov SVD method to perform the principal components analysis (PCA)...
Definition: randomized_block_krylov_method.hpp:37
size_t & MaxIterations()
Modify the number of iterations for the power method.
Definition: randomized_block_krylov_method.hpp:83
size_t BlockSize() const
Get the block size.
Definition: randomized_block_krylov_method.hpp:86
Implementation of the randomized block krylov SVD policy.
Definition: randomized_block_krylov_method.hpp:26