public class URPRecommender extends ProbabilisticGraphicalRecommender
Benjamin Marlin, Modeling user rating profiles for collaborative filtering, NIPS 2003.
Nicola Barbieri, Regularized gibbs sampling for user profiling with soft constraints, ASONAM 2011.
| Modifier and Type | Field and Description |
|---|---|
protected int |
numRatingLevels |
protected int |
numTopics
number of topics
|
protected double[][][] |
topicItemRatingProbs
posterior probabilities of parameters phi_{k, i, r}
|
protected com.google.common.collect.Table<java.lang.Integer,java.lang.Integer,java.lang.Integer> |
topics |
burnIn, numItems, numIterations, numStats, numUsers, sampleLagconf, context, decay, earlyStop, globalMean, isBoldDriver, isRanking, itemMappingData, lastLoss, LOG, loss, maxRate, minRate, numRates, ratingScale, recommendedList, testMatrix, topN, trainMatrix, userMappingData, validMatrix, verbose| Constructor and Description |
|---|
URPRecommender() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
eStep()
parameters estimation: used in the training phase
|
protected void |
estimateParams()
estimate the model parameters
|
protected boolean |
isConverged(int iter)
Post each iteration, we do things:
print debug information
check if converged
if not, adjust learning rate
|
protected void |
mStep()
Thomas P.
|
protected double |
predict(int userIdx,
int itemIdx)
predict a specific rating for user userIdx on item itemIdx, note that the
prediction is not bounded.
|
protected void |
readoutParams()
read out parameters for each iteration
|
protected void |
setup()
setup
init member method
|
trainModelcleanup, evaluate, evaluateMap, getContext, getDataModel, getRecommendedList, loadModel, predict, recommend, recommend, recommendRank, recommendRating, saveModel, setContextprotected com.google.common.collect.Table<java.lang.Integer,java.lang.Integer,java.lang.Integer> topics
protected int numTopics
protected int numRatingLevels
protected double[][][] topicItemRatingProbs
protected void setup()
throws LibrecException
ProbabilisticGraphicalRecommendersetup in class ProbabilisticGraphicalRecommenderLibrecException - if error occurs during setting upprotected void eStep()
ProbabilisticGraphicalRecommendereStep in class ProbabilisticGraphicalRecommenderprotected void mStep()
mStep in class ProbabilisticGraphicalRecommenderprotected void readoutParams()
ProbabilisticGraphicalRecommenderreadoutParams in class ProbabilisticGraphicalRecommenderprotected void estimateParams()
ProbabilisticGraphicalRecommenderestimateParams in class ProbabilisticGraphicalRecommenderprotected boolean isConverged(int iter)
AbstractRecommenderisConverged in class ProbabilisticGraphicalRecommenderiter - current iterationprotected double predict(int userIdx,
int itemIdx)
throws LibrecException
AbstractRecommenderpredict in class AbstractRecommenderuserIdx - user indexitemIdx - item indexLibrecException - if error occurs during predictingCopyright © 2017. All Rights Reserved.