@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, socialMatrixinitMean, initStd, itemFactors, learnRate, maxLearnRate, numFactors, numIterations, regItem, regUser, userFactorsconf, 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, normalizeupdateLRatecleanup, evaluate, evaluateMap, getContext, getDataModel, getRecommendedList, isConverged, loadModel, recommend, recommend, recommendRank, recommendRating, saveModel, setContextprotected 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 SocialRecommenderLibrecException - if error occursprotected void trainModel()
throws LibrecException
trainModel in class AbstractRecommenderLibrecException - if error occursprotected double predict(int userIdx,
int itemIdx)
throws LibrecException
predict in class MatrixFactorizationRecommenderuserIdx - user indexitemIdx - item indexLibrecException - if error occursprotected double predict(int userIdx,
int itemIdx,
boolean bounded)
throws LibrecException
AbstractRecommenderpredict in class SocialRecommenderuserIdx - user indexitemIdx - item indexbounded - whether there is a boundLibrecException - if error occurs during predictingCopyright © 2017. All Rights Reserved.