14 #ifndef MLPACK_METHODS_CF_DECOMPOSITION_POLICIES_RANDOMIZED_SVD_METHOD_HPP 15 #define MLPACK_METHODS_CF_DECOMPOSITION_POLICIES_RANDOMIZED_SVD_METHOD_HPP 39 const size_t maxIterations = 2) :
40 iteratedPower(iteratedPower),
41 maxIterations(maxIterations)
60 template<
typename MatType>
62 const arma::sp_mat& cleanedData,
66 const size_t maxIterations,
74 rsvd.
Apply(cleanedData, w, sigma, h, rank);
77 w = w * arma::diagmat(sigma);
size_t IteratedPower() const
Get the size of the normalized power iterations.
The core includes that mlpack expects; standard C++ includes and Armadillo.
Randomized SVD is a matrix factorization that is based on randomized matrix approximation techniques...
void Apply(const MatType &, const arma::sp_mat &cleanedData, const size_t rank, arma::mat &w, arma::mat &h, const size_t maxIterations, const double, const bool)
Apply Collaborative Filtering to the provided data set using the randomized SVD.
size_t MaxIterations() const
Get the number of iterations.
RandomizedSVDPolicy(const size_t iteratedPower=0, const size_t maxIterations=2)
Use randomized SVD method to perform collaborative filtering.
size_t & IteratedPower()
Modify the size of the normalized power iterations.
Implementation of the Randomized SVD policy to act as a wrapper when accessing Randomized SVD from wi...
size_t & MaxIterations()
Modify the number of iterations.
void Apply(const arma::sp_mat &data, arma::mat &u, arma::vec &s, arma::mat &v, const size_t rank)
Center the data to apply Principal Component Analysis on given sparse matrix dataset using randomized...