Type Parameters:
U - type of the users.
All Implemented Interfaces:
GlobalReranker<U,​U>
Direct Known Subclasses:
ClusteringCoefficientComplement, CompleteCommunityReranker, EdgeMetricReranker, GraphMetricReranker, InterCommunityReranker, UserMetricReranker

public abstract class GraphLocalReranker<U>
extends LocalLambdaReranker<U,​U>
Generalization of greedy local reranking strategies, for processing several recommendations at a time. These rerankers, given a set of recommendations, sequentially process them one by one. Those recommendations which are processed later are aware of the previously processed recommendations.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected Graph<U> graph
    The graph.

    Fields inherited from class es.uam.eps.ir.relison.links.recommendation.reranking.global.local.LocalLambdaReranker

    novMap, novStats, relStats

    Fields inherited from class es.uam.eps.ir.relison.links.recommendation.reranking.global.local.LocalGreedyReranker

    cutOff
  • Constructor Summary

    Constructors 
    Constructor Description
    GraphLocalReranker​(int cutOff, double lambda, java.util.function.Supplier<Normalizer<U>> norm, int seed, Graph<U> graph)
    Constructor.
    GraphLocalReranker​(int cutOff, double lambda, java.util.function.Supplier<Normalizer<U>> norm, Graph<U> graph)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    protected abstract void innerUpdate​(U user, org.ranksys.core.util.tuples.Tuple2od<U> updated)
    Updates the different parameters of the reranker, further than changing the edges in the graph.
    protected void update​(U user, org.ranksys.core.util.tuples.Tuple2od<U> bestItemValue)
    Given a user, and the next value to add, updates the reranker parameters.

    Methods inherited from class es.uam.eps.ir.relison.links.recommendation.reranking.global.local.LocalLambdaReranker

    nov, rerankPermutation, selectItem, value

    Methods inherited from class es.uam.eps.ir.relison.links.recommendation.reranking.global.local.LocalGreedyReranker

    getBasePerm, rerankRecommendation

    Methods inherited from class es.uam.eps.ir.relison.links.recommendation.reranking.global.local.LocalReranker

    rerankRecommendations, update

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • GraphLocalReranker

      public GraphLocalReranker​(int cutOff, double lambda, java.util.function.Supplier<Normalizer<U>> norm, Graph<U> graph)
      Constructor.
      Parameters:
      cutOff - maximum length of the definitive ranking.
      lambda - trade-off between the original and novelty scores
      norm - the normalization strategy.
      graph - the original network.
    • GraphLocalReranker

      public GraphLocalReranker​(int cutOff, double lambda, java.util.function.Supplier<Normalizer<U>> norm, int seed, Graph<U> graph)
      Constructor.
      Parameters:
      cutOff - maximum length of the definitive ranking.
      lambda - trade-off between the original and novelty scores
      norm - the normalization strategy.
      seed - the random seed.
      graph - the original network.
  • 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.
      Specified by:
      update in class LocalGreedyReranker<U,​U>
      Parameters:
      user - The user
      bestItemValue - The next value to add at the ranking
    • innerUpdate

      protected abstract void innerUpdate​(U user, org.ranksys.core.util.tuples.Tuple2od<U> updated)
      Updates the different parameters of the reranker, further than changing the edges in the graph.
      Parameters:
      user - the target user.
      updated - the new candidate user.