Class InterCommunityEdgeGiniComplement.CommPairGiniUserReranker

java.lang.Object
Enclosing class:
InterCommunityEdgeGiniComplement<U>

public class InterCommunityEdgeGiniComplement.CommPairGiniUserReranker
extends InterCommunityReranker.CommunityMetricUserReranker
Class that reranks an individual recommendation using Community Pair Gini.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    private java.util.List<java.lang.Double> matrix
    the number of edges between each pair of communities.
    private double sum
    The total number of edges between communities

    Fields inherited from class es.uam.eps.ir.relison.links.recommendation.reranking.local.communities.InterCommunityReranker.CommunityMetricUserReranker

    communities, communityGraph

    Fields inherited from class es.uam.eps.ir.relison.links.recommendation.reranking.local.LambdaReranker.LambdaUserReranker

    novMap, novStats, relStats
  • Constructor Summary

    Constructors 
    Constructor Description
    CommPairGiniUserReranker​(es.uam.eps.ir.ranksys.core.Recommendation<U,​U> recommendation, int maxLength, MultiGraph<java.lang.Integer> communityGraph, Communities<U> communities, java.util.List<java.lang.Double> matrix, double sum)
    Constructor
  • Method Summary

    Modifier and Type Method Description
    protected double nov​(org.ranksys.core.util.tuples.Tuple2od<U> tpld)
    Returns the novelty score of an item.
    protected void update​(org.ranksys.core.util.tuples.Tuple2od<U> tpld)  

    Methods inherited from class es.uam.eps.ir.relison.links.recommendation.reranking.local.LambdaReranker.LambdaUserReranker

    selectItem, value

    Methods inherited from class java.lang.Object

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

    • matrix

      private final java.util.List<java.lang.Double> matrix
      the number of edges between each pair of communities.
    • sum

      private double sum
      The total number of edges between communities
  • Constructor Details

    • CommPairGiniUserReranker

      public CommPairGiniUserReranker​(es.uam.eps.ir.ranksys.core.Recommendation<U,​U> recommendation, int maxLength, MultiGraph<java.lang.Integer> communityGraph, Communities<U> communities, java.util.List<java.lang.Double> matrix, double sum)
      Constructor
      Parameters:
      recommendation - the recommendation to be reranked
      maxLength - the maximum length of the reranked list.
      communityGraph - the community graph.
      communities - the communities
      matrix - the number of edges between each pair of communities.
      sum - the sum of the degrees.
  • Method Details

    • nov

      protected double nov​(org.ranksys.core.util.tuples.Tuple2od<U> tpld)
      Description copied from class: LambdaReranker.LambdaUserReranker
      Returns the novelty score of an item.
      Specified by:
      nov in class LambdaReranker.LambdaUserReranker
      Parameters:
      tpld - item-relevance pair
      Returns:
      the novelty of the item
    • update

      protected void update​(org.ranksys.core.util.tuples.Tuple2od<U> tpld)