Type Parameters:
U - type of the users.
All Implemented Interfaces:
GlobalReranker<U,​U>

public class InverseEdgeMetricReranker<U>
extends EdgeMetricReranker<U>
Global reranker strategy that minimizes the average value of an edge metric.
  • Constructor Details

    • InverseEdgeMetricReranker

      public InverseEdgeMetricReranker​(double lambda, int cutoff, java.util.function.Supplier<Normalizer<U>> norm, Graph<U> graph, PairMetric<U> metric)
      Constructor.
      Parameters:
      lambda - trade-off between the recommendation score and the novelty/diversity value.
      cutoff - number of elements to take.
      norm - the normalization strategy.
      graph - the original graph.
      metric - the metric we want to optimize.
  • Method Details

    • nov

      protected double nov​(U user, org.ranksys.core.util.tuples.Tuple2od<U> iv)
      Description copied from class: GlobalRankingLambdaReranker
      Finds the novelty score for a user-item pair.
      Specified by:
      nov in class GlobalRankingLambdaReranker<U,​U>
      Parameters:
      user - the target user.
      iv - the candidate item (with its score).
      Returns:
      the novelty value for the item.