@ModelData(value={"isRating","trustsvd","userFactors","itemFactors","impItemFactors","userBiases","itemBiases","socialMatrix","trainMatrix"}) public class TrustSVDRecommender extends SocialRecommender
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
cacheSpec
Guava cache configuration
|
protected double |
regBias
bias regularization
|
protected com.google.common.cache.LoadingCache<java.lang.Integer,java.util.List<java.lang.Integer>> |
userItemsCache
user-items cache, user-trustee cache
|
protected com.google.common.cache.LoadingCache<java.lang.Integer,java.util.List<java.lang.Integer>> |
userTrusteeCache
user-items cache, user-trustee cache
|
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 |
---|
TrustSVDRecommender() |
Modifier and Type | Method and Description |
---|---|
protected double |
predict(int userIdx,
int itemIdx)
predict a specific rating for user userIdx on item itemIdx.
|
protected double |
predict(int userIdx,
int itemIdx,
boolean bounded)
predict a specific rating for user userIdx on item itemIdx.
|
void |
setup()
initial the model
|
protected void |
trainModel()
train model process
|
denormalize, normalize
updateLRate
cleanup, evaluate, evaluateMap, getContext, getDataModel, getRecommendedList, isConverged, loadModel, recommend, recommend, recommendRank, recommendRating, saveModel, setContext
protected double regBias
protected com.google.common.cache.LoadingCache<java.lang.Integer,java.util.List<java.lang.Integer>> userItemsCache
protected com.google.common.cache.LoadingCache<java.lang.Integer,java.util.List<java.lang.Integer>> userTrusteeCache
protected static java.lang.String cacheSpec
public void setup() throws LibrecException
setup
in class SocialRecommender
LibrecException
- if error occursprotected void trainModel() throws LibrecException
trainModel
in class AbstractRecommender
LibrecException
- if error occursprotected double predict(int userIdx, int itemIdx) throws LibrecException
predict
in class MatrixFactorizationRecommender
userIdx
- user indexitemIdx
- item indexLibrecException
- if error occursprotected double predict(int userIdx, int itemIdx, boolean bounded) throws LibrecException
AbstractRecommender
predict
in class SocialRecommender
userIdx
- user indexitemIdx
- item indexbounded
- whether there is a boundLibrecException
- if error occurs during predictingCopyright © 2017. All Rights Reserved.