Class LambdaReranker<U,​I>

java.lang.Object
es.uam.eps.ir.ranksys.novdiv.reranking.PermutationReranker<U,​I>
es.uam.eps.ir.ranksys.novdiv.reranking.GreedyReranker<U,​I>
es.uam.eps.ir.relison.links.recommendation.reranking.local.LambdaReranker<U,​I>
Type Parameters:
U - type of the users
I - type of the items
All Implemented Interfaces:
es.uam.eps.ir.ranksys.novdiv.reranking.Reranker<U,​I>
Direct Known Subclasses:
ClusteringCoefficientComplement, EdgeMetricReranker, GraphMetricReranker, InterCommunityReranker, UserMetricReranker

public abstract class LambdaReranker<U,​I>
extends es.uam.eps.ir.ranksys.novdiv.reranking.GreedyReranker<U,​I>
Linear combination re-ranker that combines the original score of the input recommendation and a novelty component.
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    protected class  LambdaReranker.LambdaUserReranker
    User re-ranker for LambdaReranker.

    Nested classes/interfaces inherited from class es.uam.eps.ir.ranksys.novdiv.reranking.GreedyReranker

    es.uam.eps.ir.ranksys.novdiv.reranking.GreedyReranker.GreedyUserReranker<U extends java.lang.Object,​I extends java.lang.Object>
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected double lambda
    Trade-off parameter of the linear combination.
    private java.util.function.Supplier<Normalizer<I>> norm
    Function for normalizing the scores.

    Fields inherited from class es.uam.eps.ir.ranksys.novdiv.reranking.GreedyReranker

    cutoff
  • Constructor Summary

    Constructors 
    Constructor Description
    LambdaReranker​(double lambda, int cutoff, java.util.function.Supplier<Normalizer<I>> norm)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    protected abstract es.uam.eps.ir.ranksys.novdiv.reranking.GreedyReranker.GreedyUserReranker<U,​I> getUserReranker​(es.uam.eps.ir.ranksys.core.Recommendation<U,​I> recommendation, int maxLength)  
    int[] rerankPermutation​(es.uam.eps.ir.ranksys.core.Recommendation<U,​I> recommendation, int maxLength)
    Returns the permutation that is applied to the input recommendation to generate the re-ranked recommendation.

    Methods inherited from class es.uam.eps.ir.ranksys.novdiv.reranking.PermutationReranker

    getBasePerm, permuteRecommendation, rerankRecommendation

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • lambda

      protected final double lambda
      Trade-off parameter of the linear combination.
    • norm

      private final java.util.function.Supplier<Normalizer<I>> norm
      Function for normalizing the scores.
  • Constructor Details

    • LambdaReranker

      public LambdaReranker​(double lambda, int cutoff, java.util.function.Supplier<Normalizer<I>> norm)
      Constructor.
      Parameters:
      lambda - trade-off parameter of the linear combination.
      cutoff - how many items are re-ranked by the greedy selection (length of the definitive ranking).
      norm - supplier for normalizing functions.
  • Method Details

    • rerankPermutation

      public int[] rerankPermutation​(es.uam.eps.ir.ranksys.core.Recommendation<U,​I> recommendation, int maxLength)
      Returns the permutation that is applied to the input recommendation to generate the re-ranked recommendation.
      Overrides:
      rerankPermutation in class es.uam.eps.ir.ranksys.novdiv.reranking.GreedyReranker<U,​I>
      Parameters:
      recommendation - input recommendation.
      maxLength - maximum length of the permutation.
      Returns:
      permutation that encodes the re-ranking.
    • getUserReranker

      protected abstract es.uam.eps.ir.ranksys.novdiv.reranking.GreedyReranker.GreedyUserReranker<U,​I> getUserReranker​(es.uam.eps.ir.ranksys.core.Recommendation<U,​I> recommendation, int maxLength)
      Specified by:
      getUserReranker in class es.uam.eps.ir.ranksys.novdiv.reranking.GreedyReranker<U,​I>