public abstract class SocialRecommender extends MatrixFactorizationRecommender
| Modifier and Type | Field and Description |
|---|---|
protected float |
regSocial
social regularization
|
protected SparseMatrix |
socialMatrix
socialMatrix: social rate matrix, indicating a user is connecting to a number of other users
|
initMean, 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 |
|---|
SocialRecommender() |
| Modifier and Type | Method and Description |
|---|---|
protected double |
denormalize(double predictRating)
denormalize a prediction to the region (minRate, maxRate)
|
protected double |
normalize(double rating)
normalize a rating to the region (0, 1)
|
protected double |
predict(int userIdx,
int itemIdx,
boolean bounded)
predict a specific rating for user userIdx on item itemIdx.
|
void |
setup()
setup
init member method
|
predict, updateLRatecleanup, evaluate, evaluateMap, getContext, getDataModel, getRecommendedList, isConverged, loadModel, recommend, recommend, recommendRank, recommendRating, saveModel, setContext, trainModelprotected SparseMatrix socialMatrix
protected float regSocial
public void setup()
throws LibrecException
MatrixFactorizationRecommendersetup in class MatrixFactorizationRecommenderLibrecException - if error occurs during setting upprotected double predict(int userIdx,
int itemIdx,
boolean bounded)
throws LibrecException
AbstractRecommenderpredict in class AbstractRecommenderuserIdx - user indexitemIdx - item indexbounded - whether there is a boundLibrecException - if error occurs during predictingprotected double denormalize(double predictRating)
predictRating - a prediction to the region (minRate, maxRate)protected double normalize(double rating)
rating - a given ratingCopyright © 2017. All Rights Reserved.