java.lang.Object
Type Parameters:
U - type of the users.
All Implemented Interfaces:
GlobalReranker<U,​U>
Direct Known Subclasses:
DirectGraphMetricReranker, InverseGraphMetricReranker

public abstract class GraphMetricReranker<U>
extends GlobalRankingLambdaReranker<U,​U>
Global reranker strategy that reorders the candidate users according to a graph metric.
  • Field Details

  • Constructor Details

    • GraphMetricReranker

      public GraphMetricReranker​(double lambda, int cutoff, java.util.function.Supplier<Normalizer<U>> norm, Graph<U> graph, GraphMetric<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

    • update

      protected void update​(U user, org.ranksys.core.util.tuples.Tuple2od<U> bestItemValue)
      Description copied from class: GlobalRankingGreedyReranker
      Updates the value of the objective function after a selection.
      Specified by:
      update in class GlobalRankingGreedyReranker<U,​U>
      Parameters:
      user - the selected user.
      bestItemValue - the selected item and its score.