SVD++ is a matrix decomposition tenique used in collaborative filtering. More...
Public Member Functions | |
SVDPlusPlus (const size_t iterations=10, const double alpha=0.001, const double lambda=0.1) | |
Constructor of SVDPlusPlus. More... | |
void | Apply (const arma::mat &data, const arma::mat &implicitData, const size_t rank, arma::mat &u, arma::mat &v, arma::vec &p, arma::vec &q, arma::mat &y) |
Trains the model and obtains user/item matrices, user/item bias, and item implicit matrix. More... | |
void | Apply (const arma::mat &data, const size_t rank, arma::mat &u, arma::mat &v, arma::vec &p, arma::vec &q, arma::mat &y) |
Trains the model and obtains user/item matrices, user/item bias, and item implicit matrix. More... | |
Static Public Member Functions | |
static void | CleanData (const arma::mat &implicitData, arma::sp_mat &cleanedData, const arma::mat &data) |
Converts the User, Item matrix of implicit data to Item-User Table. More... | |
SVD++ is a matrix decomposition tenique used in collaborative filtering.
SVD++ is similar to BiasSVD, but it is a more expressive model because SVD++ also models implicit feedback. SVD++ outputs user/item latent vectors, user/item bias, and item vectors with regard to implicit feedback. Parameters are optmized by Stochastic Gradient Desent(SGD). The updates also penalize the learning of large feature values by means of regularization.
For more information, see the following paper:
An example of how to use the interface is shown below:
Definition at line 76 of file svdplusplus.hpp.
SVDPlusPlus | ( | const size_t | iterations = 10 , |
const double | alpha = 0.001 , |
||
const double | lambda = 0.1 |
||
) |
Constructor of SVDPlusPlus.
By default SGD optimizer is used in SVDPlusPlus. 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 arma::mat & | implicitData, | ||
const size_t | rank, | ||
arma::mat & | u, | ||
arma::mat & | v, | ||
arma::vec & | p, | ||
arma::vec & | q, | ||
arma::mat & | y | ||
) |
Trains the model and obtains user/item matrices, user/item bias, and item implicit matrix.
data | Rating data matrix. |
implicitData | Implicit feedback. |
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. |
y | Item matrix with respect to implicit feedback. |
Referenced by SVDPlusPlusPolicy::Apply().
void Apply | ( | const arma::mat & | data, |
const size_t | rank, | ||
arma::mat & | u, | ||
arma::mat & | v, | ||
arma::vec & | p, | ||
arma::vec & | q, | ||
arma::mat & | y | ||
) |
Trains the model and obtains user/item matrices, user/item bias, and item implicit matrix.
Whether a user rates an item is used as implicit feedback.
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. |
y | Item matrix with respect to implicit feedback. Each column is a latent vector of an item with respect to implicit feedback. |
|
static |
Converts the User, Item matrix of implicit data to Item-User Table.
Referenced by SVDPlusPlusPolicy::Apply().