@ModelData(value={"isRating","trustmf","trusterUserTrusterFactors","trusterUserTrusteeFactors","trusteeUserTrusterFactors","trusteeUserTrusteeFactors","model"}) public class TrustMFRecommender extends SocialRecommender
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
model
model selection identifier
|
protected DenseMatrix |
trusteeItemFactors
trustee model
|
protected DenseMatrix |
trusteeUserTrusteeFactors
trustee model
|
protected DenseMatrix |
trusteeUserTrusterFactors
trustee model
|
protected DenseMatrix |
trusterItemFactors
truster model
|
protected DenseMatrix |
trusterUserTrusteeFactors
truster model
|
protected DenseMatrix |
trusterUserTrusterFactors
truster model
|
regSocial, socialMatrix
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 |
---|
TrustMFRecommender() |
Modifier and Type | Method and Description |
---|---|
protected void |
initTe() |
protected void |
initTr() |
protected double |
predict(int userIdx,
int itemIdx)
predict a specific rating for user userIdx on item itemIdx.
|
void |
setup()
setup
init member method
|
protected void |
trainModel()
train Model
|
protected void |
TrusteeMF()
Build TrusteeMF model: We*Ve
|
protected void |
TrusterMF()
Build TrusterMF model: Br*Vr
|
protected void |
updateLRate(int iter)
This is the method used by the paper authors
|
denormalize, normalize, predict
cleanup, evaluate, evaluateMap, getContext, getDataModel, getRecommendedList, isConverged, loadModel, recommend, recommend, recommendRank, recommendRating, saveModel, setContext
protected DenseMatrix trusterUserTrusterFactors
protected DenseMatrix trusterUserTrusteeFactors
protected DenseMatrix trusterItemFactors
protected DenseMatrix trusteeUserTrusterFactors
protected DenseMatrix trusteeUserTrusteeFactors
protected DenseMatrix trusteeItemFactors
protected java.lang.String model
public void setup() throws LibrecException
MatrixFactorizationRecommender
setup
in class SocialRecommender
LibrecException
- if error occurs during setting upprotected void initTr()
protected void initTe()
protected void trainModel() throws LibrecException
AbstractRecommender
trainModel
in class AbstractRecommender
LibrecException
- if error occurs during training modelprotected void TrusterMF() throws LibrecException
LibrecException
- if error occursprotected void TrusteeMF() throws LibrecException
LibrecException
- if error occursprotected void updateLRate(int iter)
updateLRate
in class MatrixFactorizationRecommender
iter
- number of iterationprotected double predict(int userIdx, int itemIdx)
MatrixFactorizationRecommender
predict
in class MatrixFactorizationRecommender
userIdx
- user indexitemIdx
- item indexCopyright © 2017. All Rights Reserved.