public class AssociationRuleRecommender extends AbstractRecommender
Simple Association Rule Recommender: we do not consider the item categories (or multi levels) used in the original paper. Besides, we consider all association rules without ruling out weak ones (by setting high support and confidence threshold).
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
cacheSpec
Guava cache configuration
|
protected com.google.common.cache.LoadingCache<java.lang.Integer,SparseVector> |
userCache
user-vector cache, item-vector cache
|
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 |
---|
AssociationRuleRecommender() |
Modifier and Type | Method and Description |
---|---|
protected double |
predict(int userIdx,
int itemIdx)
predict a specific rating for user userIdx on item itemIdx.
|
protected void |
setup()
setup
|
protected void |
trainModel()
train Model
|
cleanup, evaluate, evaluateMap, getContext, getDataModel, getRecommendedList, isConverged, loadModel, predict, recommend, recommend, recommendRank, recommendRating, saveModel, setContext
protected com.google.common.cache.LoadingCache<java.lang.Integer,SparseVector> userCache
protected static java.lang.String cacheSpec
protected void setup() throws LibrecException
setup
in class AbstractRecommender
LibrecException
- if error occursprotected void trainModel() throws LibrecException
AbstractRecommender
trainModel
in class AbstractRecommender
LibrecException
- if error occurs during training modelprotected double predict(int userIdx, int itemIdx) throws LibrecException
predict
in class AbstractRecommender
userIdx
- user indexitemIdx
- item indexLibrecException
- if error occursCopyright © 2017. All Rights Reserved.