RandomizedSVDPolicy Class Reference

Implementation of the Randomized SVD policy to act as a wrapper when accessing Randomized SVD from within CFType. More...

Public Member Functions

 RandomizedSVDPolicy (const size_t iteratedPower=0, const size_t maxIterations=2)
 Use randomized SVD method to perform collaborative filtering. More...

 
template
<
typename
MatType
>
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. 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. More...

 
size_t & MaxIterations ()
 Modify the number of iterations. More...

 

Detailed Description

Implementation of the Randomized SVD policy to act as a wrapper when accessing Randomized SVD from within CFType.

Definition at line 27 of file randomized_svd_method.hpp.

Constructor & Destructor Documentation

◆ RandomizedSVDPolicy()

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

Use randomized SVD method to perform collaborative filtering.

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

Definition at line 38 of file randomized_svd_method.hpp.

Member Function Documentation

◆ Apply()

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   
)
inline

Apply Collaborative Filtering to the provided data set using the randomized SVD.

Parameters
dataData matrix: dense matrix (coordinate lists) or sparse matrix(cleaned).
cleanedDataitem user table in form of sparse matrix.
rankRank parameter for matrix factorization.
wFirst matrix formed after decomposition.
hSecond matrix formed after decomposition.
maxIterationsMaximum number of iterations.
minResidueResidue required to terminate.
mitWhether to terminate only when maxIterations is reached.

Definition at line 61 of file randomized_svd_method.hpp.

References RandomizedSVD::Apply().

◆ IteratedPower() [1/2]

size_t IteratedPower ( ) const
inline

Get the size of the normalized power iterations.

Definition at line 84 of file randomized_svd_method.hpp.

◆ IteratedPower() [2/2]

size_t& IteratedPower ( )
inline

Modify the size of the normalized power iterations.

Definition at line 86 of file randomized_svd_method.hpp.

◆ MaxIterations() [1/2]

size_t MaxIterations ( ) const
inline

Get the number of iterations.

Definition at line 89 of file randomized_svd_method.hpp.

◆ MaxIterations() [2/2]

size_t& MaxIterations ( )
inline

Modify the number of iterations.

Definition at line 91 of file randomized_svd_method.hpp.


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