public class UserKNN extends Recommender
It supports both recommendation tasks: (1) rating prediction; and (2) item
ranking (by configuring isRankingPred=on
in the librec.conf). For
item ranking, the returned score is the summation of the similarities of
nearest neighbors.
When the number of users is extremely large which makes it memory intensive to store/precompute all user-user correlations, a trick presented by (Jahrer and Toscher, Collaborative Filtering Ensemble, JMLR 2012) can be applied. Specifically, we can use a basic SVD model to obtain user-feature vectors, and then user-user correlations can be computed by Eqs (17, 15).
Recommender.Measure
algoName, cf, isRankingPred, measures, params, rateDao, rateMatrix
Constructor and Description |
---|
UserKNN(SparseMatrix trainMatrix,
SparseMatrix testMatrix,
int fold) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
toString()
useful to print out specific recommender's settings
|
execute, getEvalInfo, run
public UserKNN(SparseMatrix trainMatrix, SparseMatrix testMatrix, int fold)
public java.lang.String toString()
Recommender
toString
in class Recommender