mlpack 3.4.2
randomized_block_krylov_svd.hpp
Go to the documentation of this file.
1
13#ifndef MLPACK_METHODS_BLOCK_KRYLOV_SVD_RANDOMIZED_BLOCK_KRYLOV_SVD_HPP
14#define MLPACK_METHODS_BLOCK_KRYLOV_SVD_RANDOMIZED_BLOCK_KRYLOV_SVD_HPP
15
16#include <mlpack/prereqs.hpp>
17
18namespace mlpack {
19namespace svd {
20
59{
60 public:
73 RandomizedBlockKrylovSVD(const arma::mat& data,
74 arma::mat& u,
75 arma::vec& s,
76 arma::mat& v,
77 const size_t maxIterations = 2,
78 const size_t rank = 0,
79 const size_t blockSize = 0);
80
88 RandomizedBlockKrylovSVD(const size_t maxIterations = 2,
89 const size_t blockSize = 0);
90
101 void Apply(const arma::mat& data,
102 arma::mat& u,
103 arma::vec& s,
104 arma::mat& v,
105 const size_t rank);
106
108 size_t MaxIterations() const { return maxIterations; }
110 size_t& MaxIterations() { return maxIterations; }
111
113 size_t BlockSize() const { return blockSize; }
115 size_t& BlockSize() { return blockSize; }
116
117 private:
119 size_t maxIterations;
120
122 size_t blockSize;
123};
124
125} // namespace svd
126} // namespace mlpack
127
128#endif
Randomized block krylov SVD is a matrix factorization that is based on randomized matrix approximatio...
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.
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.
RandomizedBlockKrylovSVD(const arma::mat &data, arma::mat &u, arma::vec &s, arma::mat &v, const size_t maxIterations=2, const size_t rank=0, const size_t blockSize=0)
Create object for the randomized block krylov SVD method.
RandomizedBlockKrylovSVD(const size_t maxIterations=2, const size_t blockSize=0)
Create object for the randomized block krylov SVD method.
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
The core includes that mlpack expects; standard C++ includes and Armadillo.