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

public abstract class GraphMetricReranker<U>
extends GraphLocalReranker<U>
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 original and novelty scores
      cutoff - maximum length of the definitive ranking.
      norm - the normalization strategy.
      graph - the original graph.
      metric - the vertex metric to optimize.
  • Method Details

    • update

      protected void update​(U user, org.ranksys.core.util.tuples.Tuple2od<U> bestItemValue)
      Description copied from class: LocalGreedyReranker
      Given a user, and the next value to add, updates the reranker parameters.
      Overrides:
      update in class GraphLocalReranker<U>
      Parameters:
      user - The user
      bestItemValue - The next value to add at the ranking