covNMF,getPreds,getNMF | R Documentation |
Tools to incorporate user and item information into recommender system methodology.
covNMF(narrowrat,k) getPreds(narrowrat) getNMF(narrowrat,k)
narrowrat |
Three (or move)-column data frame, with the format within each row being (userID, itemID, rating. |
k |
Desired NMF rank. |
The covNMF
function inputs a user ratings matrix, and if
covariate information is present, i.e. there are more than three
columns, regresses the ratings against the covariates. This is used
to compute predicted values of the ratings, given the covariates.
The predicted values are subtracted from the actual ratings,
truncating below at 0 if necessary. (If no covariate information is
present, then the ratings do not change.)
Then the nonnegative matrix factorization is performed. First, the
full matrix is constructed from (the first three columns of)
narrowrat
. NMF is applied to the result, by calling
getNMF
.
If several values of k
will be tried, one should form the
predicted values separately, by calling getPreds
, then adjusting
the input matrix, then calling getNMF
.
The functions covNMF
and getNMF
return the
matrix approximating the one built by buildMatrix
, thus providing
estimated values for the missing ratings.
Norm Matloff
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.