@ModelData(value={"isRanking","itembigram","userTopicProbs","topicPreItemCurItemProbs"}) public class ItemBigramRecommender extends ProbabilisticGraphicalRecommender
| Modifier and Type | Field and Description |
|---|---|
protected DenseVector |
alpha
vector of hyperparameters for alpha
|
protected float |
initAlpha
Dirichlet hyper-parameters of user-topic distribution: typical value is 50/K
|
protected float |
initBeta
Dirichlet hyper-parameters of topic-item distribution, typical value is 0.01
|
protected int |
numTopics
number of topics
|
protected com.google.common.collect.Table<java.lang.Integer,java.lang.Integer,java.lang.Integer> |
topicAssignments
entry[u, i, k]: topic assignment as sparse structure
|
protected DenseVector |
userTokenNumbers
entry[u]: number of tokens rated by user u.
|
protected DenseMatrix |
userTopicNumbers
entry[u, k]: number of tokens assigned to topic k, given user u.
|
protected DenseMatrix |
userTopicProbs
posterior probabilities of parameters
|
protected DenseMatrix |
userTopicProbsSum
cumulative statistics of theta, phi
|
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 |
|---|
ItemBigramRecommender() |
| 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
|
isConverged, trainModelcleanup, evaluate, evaluateMap, getContext, getDataModel, getRecommendedList, loadModel, predict, recommend, recommend, recommendRank, recommendRating, saveModel, setContextprotected DenseVector alpha
protected int numTopics
protected float initAlpha
protected float initBeta
protected DenseMatrix userTopicProbsSum
protected DenseMatrix userTopicNumbers
protected DenseVector userTokenNumbers
protected DenseMatrix userTopicProbs
protected com.google.common.collect.Table<java.lang.Integer,java.lang.Integer,java.lang.Integer> topicAssignments
protected void setup()
throws LibrecException
ProbabilisticGraphicalRecommendersetup in class ProbabilisticGraphicalRecommenderLibrecException - if error occurs during setting upprotected 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.