U
- type of the usersI
- type of the itemsprotected abstract class GreedyReranker.GreedyUserReranker<U,I> extends Object
Modifier and Type | Field and Description |
---|---|
protected int |
maxLength
maximum length of the re-ranked recommendation
|
protected Recommendation<U,I> |
recommendation
input recommendation
|
Constructor and Description |
---|
GreedyUserReranker(Recommendation<U,I> recommendation,
int maxLength)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int[] |
rerankPermutation()
Returns the permutation to obtain the re-ranking
|
protected int |
selectItem(it.unimi.dsi.fastutil.ints.IntSortedSet remainingI,
List<Tuple2od<I>> list)
Selects the next element of the permutation that maximizes the
objective function.
|
protected abstract void |
update(Tuple2od<I> bestItemValue)
Updates the value of the objective function after a selection.
|
protected abstract double |
value(Tuple2od<I> itemValue)
Objective function that drives the greedy selection.
|
protected final Recommendation<U,I> recommendation
protected final int maxLength
public GreedyUserReranker(Recommendation<U,I> recommendation, int maxLength)
recommendation
- input recommendationmaxLength
- maximum length of the re-ranked recommendationpublic int[] rerankPermutation()
protected int selectItem(it.unimi.dsi.fastutil.ints.IntSortedSet remainingI, List<Tuple2od<I>> list)
remainingI
- positions of the original recommendation that have
not been selected yet.list
- the list of item-score pairs of the input recommendationprotected abstract double value(Tuple2od<I> itemValue)
itemValue
- item-score pair of the input recommendation.Copyright © 2016. All rights reserved.