U - type of the usersI - type of the itemspublic abstract class PermutationReranker<U,I> extends Object implements Reranker<U,I>
| Constructor and Description |
|---|
PermutationReranker() |
| Modifier and Type | Method and Description |
|---|---|
protected static int[] |
getBasePerm(int n)
Returns a null permutation, that is, an array with values 0..(N-1).
|
static <U,I> Recommendation<U,I> |
permuteRecommendation(Recommendation<U,I> recommendation,
int[] perm)
Applies a permutation to re-rank a recommendation.
|
abstract int[] |
rerankPermutation(Recommendation<U,I> recommendation,
int maxLength)
Returns the permutation that is applied to the input recommendation
to generate the re-ranked recommendation.
|
Recommendation<U,I> |
rerankRecommendation(Recommendation<U,I> recommendation,
int maxLength)
Re-ranks a recommendation.
|
public abstract int[] rerankPermutation(Recommendation<U,I> recommendation, int maxLength)
recommendation - input recommendationmaxLength - maximum length of the permutationpublic Recommendation<U,I> rerankRecommendation(Recommendation<U,I> recommendation, int maxLength)
RerankerrerankRecommendation in interface Reranker<U,I>recommendation - recommendation to be re-rankedmaxLength - maximum length of the re-rankingpublic static <U,I> Recommendation<U,I> permuteRecommendation(Recommendation<U,I> recommendation, int[] perm)
U - type of the usersI - type of the itemsrecommendation - input recommendationperm - permutationprotected static int[] getBasePerm(int n)
n - size of the permutationCopyright © 2016. All rights reserved.