U
- type of the usersI
- type of the itemspublic class AlphaBayesRuleReranker<U,I> extends BayesRuleReranker<U,I>
Constructor and Description |
---|
AlphaBayesRuleReranker(double alpha,
it.unimi.dsi.fastutil.objects.Object2DoubleMap<I> norm)
Constructor that receives a pre-calculated norm map.
|
AlphaBayesRuleReranker(double alpha,
Stream<Recommendation<U,I>> recommendations)
Constructor that receives a set of recommendations and calculates the
norm.
|
AlphaBayesRuleReranker(double alpha,
Stream<U> users,
Recommender<U,I> recommender)
Constructor that generates recommendations to calculate a norm.
|
Modifier and Type | Method and Description |
---|---|
static <U,I> it.unimi.dsi.fastutil.objects.Object2DoubleMap<I> |
calculateNorm(Stream<Recommendation<U,I>> recommendations)
Calculates the norm (sum of relevance scores) of each item.
|
protected double |
likelihood(Tuple2od<I> iv)
Returns the likelihood of an item: p(u | i).
|
protected double |
prior(I i)
Returns the prior of an item: p(i).
|
rerankPermutation
getBasePerm, permuteRecommendation, rerankRecommendation
public AlphaBayesRuleReranker(double alpha, it.unimi.dsi.fastutil.objects.Object2DoubleMap<I> norm)
alpha
- smoothing of the priornorm
- norm mappublic AlphaBayesRuleReranker(double alpha, Stream<Recommendation<U,I>> recommendations)
alpha
- smoothing of the priorrecommendations
- previously calculated recommendationspublic AlphaBayesRuleReranker(double alpha, Stream<U> users, Recommender<U,I> recommender)
alpha
- smoothing of the priorusers
- set of users to generate recommendations to calculate the normrecommender
- recommender whose norm is usedpublic static <U,I> it.unimi.dsi.fastutil.objects.Object2DoubleMap<I> calculateNorm(Stream<Recommendation<U,I>> recommendations)
U
- type of the usersI
- type of the itemsrecommendations
- set of recommendations used to calculate the normprotected double likelihood(Tuple2od<I> iv)
BayesRuleReranker
likelihood
in class BayesRuleReranker<U,I>
iv
- item-relevance pairprotected double prior(I i)
BayesRuleReranker
prior
in class BayesRuleReranker<U,I>
i
- itemCopyright © 2016. All rights reserved.