public class BPMFRecommender extends MatrixFactorizationRecommender
Matlab version is provided by the authors via this link. This implementation is modified from the BayesianPMF by the PREA package. Bayesian Probabilistic Matrix Factorization
Modifier and Type | Class and Description |
---|---|
class |
BPMFRecommender.HyperParameters |
initMean, initStd, itemFactors, learnRate, maxLearnRate, numFactors, numIterations, regItem, regUser, userFactors
conf, context, decay, earlyStop, globalMean, isBoldDriver, isRanking, itemMappingData, lastLoss, LOG, loss, maxRate, minRate, numItems, numRates, numUsers, ratingScale, recommendedList, testMatrix, topN, trainMatrix, userMappingData, validMatrix, verbose
Constructor and Description |
---|
BPMFRecommender() |
Modifier and Type | Method and Description |
---|---|
protected void |
initModel()
Initialize the model
|
protected double |
predict(int userIdx,
int itemIdx)
predict a specific rating for user userIdx on item itemIdx.
|
protected BPMFRecommender.HyperParameters |
samplingHyperParameters(BPMFRecommender.HyperParameters hyperParameters,
DenseMatrix factors,
DenseVector normalMu0,
double normalBeta0,
DenseMatrix WishartScale0,
double WishartNu0) |
protected void |
setup()
setup
init member method
|
protected void |
trainModel()
train Model
|
protected DenseVector |
updateParameters(DenseMatrix factors,
SparseVector ratings,
BPMFRecommender.HyperParameters hyperParameters) |
updateLRate
cleanup, evaluate, evaluateMap, getContext, getDataModel, getRecommendedList, isConverged, loadModel, predict, recommend, recommend, recommendRank, recommendRating, saveModel, setContext
protected void setup() throws LibrecException
MatrixFactorizationRecommender
setup
in class MatrixFactorizationRecommender
LibrecException
- if error occurs during setting upprotected void initModel() throws LibrecException
LibrecException
- if error occursprotected void trainModel() throws LibrecException
AbstractRecommender
trainModel
in class AbstractRecommender
LibrecException
- if error occurs during training modelprotected BPMFRecommender.HyperParameters samplingHyperParameters(BPMFRecommender.HyperParameters hyperParameters, DenseMatrix factors, DenseVector normalMu0, double normalBeta0, DenseMatrix WishartScale0, double WishartNu0) throws LibrecException
LibrecException
protected DenseVector updateParameters(DenseMatrix factors, SparseVector ratings, BPMFRecommender.HyperParameters hyperParameters) throws LibrecException
LibrecException
protected double predict(int userIdx, int itemIdx)
MatrixFactorizationRecommender
predict
in class MatrixFactorizationRecommender
userIdx
- user indexitemIdx
- item indexCopyright © 2017. All Rights Reserved.