Class InterCommunityDegreeGiniComplement<U>
java.lang.Object
es.uam.eps.ir.ranksys.novdiv.reranking.PermutationReranker<U,I>
es.uam.eps.ir.ranksys.novdiv.reranking.GreedyReranker<U,I>
es.uam.eps.ir.relison.links.recommendation.reranking.local.LambdaReranker<U,U>
es.uam.eps.ir.relison.links.recommendation.reranking.local.communities.InterCommunityReranker<U>
es.uam.eps.ir.relison.links.recommendation.reranking.local.communities.InterCommunityDegreeGiniComplement<U>
- Type Parameters:
U
- type of the users
- All Implemented Interfaces:
es.uam.eps.ir.ranksys.novdiv.reranking.Reranker<U,U>
public class InterCommunityDegreeGiniComplement<U> extends InterCommunityReranker<U>
Implementation of a reranking strategy for balancing the distribution of the degrees of the communities
in a community graph. It only considers links between communities.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
InterCommunityDegreeGiniComplement.CommGiniUserReranker
Class that reranks an individual recommendation using Community Gini.Nested classes/interfaces inherited from class es.uam.eps.ir.relison.links.recommendation.reranking.local.communities.InterCommunityReranker
InterCommunityReranker.CommunityMetricUserReranker
Nested classes/interfaces inherited from class es.uam.eps.ir.relison.links.recommendation.reranking.local.LambdaReranker
LambdaReranker.LambdaUserReranker
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.Integer,java.lang.Integer>
degrees
Community degrees.protected EdgeOrientation
orientation
Orientation of the edges.protected double
sum
Sum of the community degrees.Fields inherited from class es.uam.eps.ir.relison.links.recommendation.reranking.local.communities.InterCommunityReranker
communities, communityGraph, graph
Fields inherited from class es.uam.eps.ir.relison.links.recommendation.reranking.local.LambdaReranker
lambda
-
Constructor Summary
Constructors Constructor Description InterCommunityDegreeGiniComplement(double lambda, int cutoff, java.util.function.Supplier<Normalizer<U>> norm, Graph<U> graph, Communities<U> communities, EdgeOrientation orientation)
Constructor. -
Method Summary
Modifier and Type Method Description protected es.uam.eps.ir.ranksys.novdiv.reranking.GreedyReranker.GreedyUserReranker<U,U>
getUserReranker(es.uam.eps.ir.ranksys.core.Recommendation<U,U> r, int i)
Methods inherited from class es.uam.eps.ir.relison.links.recommendation.reranking.local.LambdaReranker
rerankPermutation
-
Field Details
-
orientation
Orientation of the edges. -
degrees
protected java.util.Map<java.lang.Integer,java.lang.Integer> degreesCommunity degrees. -
sum
protected double sumSum of the community degrees.
-
-
Constructor Details
-
InterCommunityDegreeGiniComplement
public InterCommunityDegreeGiniComplement(double lambda, int cutoff, java.util.function.Supplier<Normalizer<U>> norm, Graph<U> graph, Communities<U> communities, EdgeOrientation orientation)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.communities
- the relation between users and communities.orientation
- the neighborhood selection for computing the degree.
-
-
Method Details
-
getUserReranker
protected es.uam.eps.ir.ranksys.novdiv.reranking.GreedyReranker.GreedyUserReranker<U,U> getUserReranker(es.uam.eps.ir.ranksys.core.Recommendation<U,U> r, int i)- Specified by:
getUserReranker
in classLambdaReranker<U,U>
-