Bias SVD is an improvement on Regularized SVD which is a matrix factorization techniques. More...
Public Member Functions | |
BiasSVD (const size_t iterations=10, const double alpha=0.02, const double lambda=0.05) | |
Constructor of Bias SVD. More... | |
void | Apply (const arma::mat &data, const size_t rank, arma::mat &u, arma::mat &v, arma::vec &p, arma::vec &q) |
Trains the model and obtains user/item matrices and user/item bias. More... | |
Bias SVD is an improvement on Regularized SVD which is a matrix factorization techniques.
Bias SVD outputs user/item latent vectors and user/item bias, so that , where b, p, q are bias, item latent, user latent respectively. Parameters are optmized by Stochastic Gradient Desent(SGD). The updates also penalize the learning of large feature values by means of regularization.
An example of how to use the interface is shown below:
Definition at line 57 of file bias_svd.hpp.
BiasSVD | ( | const size_t | iterations = 10 , |
const double | alpha = 0.02 , |
||
const double | lambda = 0.05 |
||
) |
Constructor of Bias SVD.
By default SGD optimizer is used in BiasSVD. The optimizer uses a template specialization of Optimize().
iterations | Number of optimization iterations. |
alpha | Learning rate for the SGD optimizer. |
lambda | Regularization parameter for the optimization. |
void Apply | ( | const arma::mat & | data, |
const size_t | rank, | ||
arma::mat & | u, | ||
arma::mat & | v, | ||
arma::vec & | p, | ||
arma::vec & | q | ||
) |
Trains the model and obtains user/item matrices and user/item bias.
data | Rating data matrix. |
rank | Rank parameter to be used for optimization. |
u | Item matrix obtained on decomposition. |
v | User matrix obtained on decomposition. |
p | Item bias. |
q | User bias. |
Referenced by BiasSVDPolicy::Apply().