public class AspectModelRecommender extends ProbabilisticGraphicalRecommender
This implementation refers to the method proposed by Thomas et al. at IJCAI 1999.
Tempered EM: Thomas Hofmann, Latent class models for collaborative filtering , IJCAI. 1999, 99: 688-693.
| Modifier and Type | Field and Description |
|---|---|
protected int |
numTopics |
protected com.google.common.collect.Table<java.lang.Integer,java.lang.Integer,java.util.Map<java.lang.Integer,java.lang.Double>> |
Q |
protected static double |
smallValue |
protected DenseMatrix |
topicItemProbs |
protected DenseMatrix |
topicItemProbsSum |
protected DenseVector |
topicProbs |
protected DenseVector |
topicProbsMean |
protected DenseVector |
topicProbsMeanSum |
protected DenseVector |
topicProbsSum |
protected DenseVector |
topicProbsVariance |
protected DenseVector |
topicProbsVarianceSum |
protected DenseMatrix |
topicUserProbs |
protected DenseMatrix |
topicUserProbsSum |
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 |
|---|
AspectModelRecommender() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
eStep()
parameters estimation: used in the training phase
|
protected void |
estimateParams()
estimate the model parameters
|
protected void |
mStep()
update the hyper-parameters
|
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
|
protected void |
trainModel()
train Model
|
isConvergedcleanup, evaluate, evaluateMap, getContext, getDataModel, getRecommendedList, loadModel, predict, recommend, recommend, recommendRank, recommendRating, saveModel, setContextprotected DenseMatrix topicUserProbs
protected DenseMatrix topicUserProbsSum
protected DenseMatrix topicItemProbs
protected DenseMatrix topicItemProbsSum
protected DenseVector topicProbs
protected DenseVector topicProbsSum
protected DenseVector topicProbsMean
protected DenseVector topicProbsMeanSum
protected DenseVector topicProbsVariance
protected DenseVector topicProbsVarianceSum
protected int numTopics
protected static double smallValue
protected com.google.common.collect.Table<java.lang.Integer,java.lang.Integer,java.util.Map<java.lang.Integer,java.lang.Double>> Q
protected void setup()
throws LibrecException
ProbabilisticGraphicalRecommendersetup in class ProbabilisticGraphicalRecommenderLibrecException - if error occurs during setting upprotected void trainModel()
throws LibrecException
AbstractRecommendertrainModel in class ProbabilisticGraphicalRecommenderLibrecException - if error occurs during training modelprotected void eStep()
ProbabilisticGraphicalRecommendereStep in class ProbabilisticGraphicalRecommenderprotected void mStep()
ProbabilisticGraphicalRecommendermStep in class ProbabilisticGraphicalRecommenderprotected void readoutParams()
ProbabilisticGraphicalRecommenderreadoutParams in class ProbabilisticGraphicalRecommenderprotected void estimateParams()
ProbabilisticGraphicalRecommenderestimateParams in class ProbabilisticGraphicalRecommenderprotected 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.