mlpack
1.0.12
|
Public Member Functions | |
RegularizedSVD (const arma::mat &data, arma::mat &u, arma::mat &v, const size_t rank, const size_t iterations=10, const double alpha=0.01, const double lambda=0.02) | |
Constructor for Regularized SVD. More... | |
Private Attributes | |
double | alpha |
Learning rate for the SGD optimizer. More... | |
const arma::mat & | data |
Rating data. More... | |
size_t | iterations |
Number of optimization iterations. More... | |
double | lambda |
Regularization parameter for the optimization. More... | |
mlpack::optimization::SGD< RegularizedSVDFunction > | optimizer |
Default SGD optimizer for the class. More... | |
size_t | rank |
Rank used for matrix factorization. More... | |
RegularizedSVDFunction | rSVDFunc |
Function that will be held by the optimizer. More... | |
Definition at line 29 of file regularized_svd.hpp.
mlpack::svd::RegularizedSVD< OptimizerType >::RegularizedSVD | ( | const arma::mat & | data, |
arma::mat & | u, | ||
arma::mat & | v, | ||
const size_t | rank, | ||
const size_t | iterations = 10 , |
||
const double | alpha = 0.01 , |
||
const double | lambda = 0.02 |
||
) |
Constructor for Regularized SVD.
Obtains the user and item matrices after training on the passed data. The constructor initiates an object of class RegularizedSVDFunction for optimization. It uses the SGD optimizer by default. The optimizer uses a template specialization of Optimize().
data | Dataset for which SVD is calculated. |
u | User matrix in the matrix decomposition. |
v | Item matrix in the matrix decomposition. |
rank | Rank used for matrix factorization. |
iterations | Number of optimization iterations. |
lambda | Regularization parameter for the optimization. |
|
private |
Learning rate for the SGD optimizer.
Definition at line 62 of file regularized_svd.hpp.
|
private |
Rating data.
Definition at line 56 of file regularized_svd.hpp.
|
private |
Number of optimization iterations.
Definition at line 60 of file regularized_svd.hpp.
|
private |
Regularization parameter for the optimization.
Definition at line 64 of file regularized_svd.hpp.
|
private |
Default SGD optimizer for the class.
Definition at line 68 of file regularized_svd.hpp.
|
private |
Rank used for matrix factorization.
Definition at line 58 of file regularized_svd.hpp.
|
private |
Function that will be held by the optimizer.
Definition at line 66 of file regularized_svd.hpp.