Class InterCommunityDegreeGiniComplement<U>
java.lang.Object
es.uam.eps.ir.relison.links.recommendation.reranking.global.globalranking.GlobalRankingGreedyReranker<U,I>
es.uam.eps.ir.relison.links.recommendation.reranking.global.globalranking.GlobalRankingLambdaReranker<U,U>
es.uam.eps.ir.relison.links.recommendation.reranking.global.globalranking.communities.InterCommunityReranker<U>
es.uam.eps.ir.relison.links.recommendation.reranking.global.globalranking.communities.InterCommunityDegreeGiniComplement<U>
- Type Parameters:
U
- type of the users
- All Implemented Interfaces:
GlobalReranker<U,U>
public class InterCommunityDegreeGiniComplement<U> extends InterCommunityReranker<U>
Implementation of a global reranking strategy for balancing the distribution of the degrees of the communities
in a community graph. It only considers links between communities.
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.Integer,java.lang.Integer>
degrees
Community degrees.protected EdgeOrientation
orientation
Community Gini orientation selectionprotected double
sum
Number of edges between communitiesFields inherited from class es.uam.eps.ir.relison.links.recommendation.reranking.global.globalranking.communities.InterCommunityReranker
communities, communityGraph, graph
Fields inherited from class es.uam.eps.ir.relison.links.recommendation.reranking.global.globalranking.GlobalRankingLambdaReranker
lambda, novStats, recStats
Fields inherited from class es.uam.eps.ir.relison.links.recommendation.reranking.global.globalranking.GlobalRankingGreedyReranker
cutOff
-
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 double
nov(U user, org.ranksys.core.util.tuples.Tuple2od<U> item)
Finds the novelty score for a user-item pair.protected void
update(U user, org.ranksys.core.util.tuples.Tuple2od<U> selectedItem)
Updates the value of the objective function after a selection.Methods inherited from class es.uam.eps.ir.relison.links.recommendation.reranking.global.globalranking.GlobalRankingLambdaReranker
score, selectRecommendation
Methods inherited from class es.uam.eps.ir.relison.links.recommendation.reranking.global.globalranking.GlobalRankingGreedyReranker
rerankRecommendations
-
Field Details
-
orientation
Community Gini orientation selection -
sum
protected double sumNumber of edges between communities -
degrees
protected java.util.Map<java.lang.Integer,java.lang.Integer> degreesCommunity 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
-
nov
Description copied from class:GlobalRankingLambdaReranker
Finds the novelty score for a user-item pair.- Specified by:
nov
in classGlobalRankingLambdaReranker<U,U>
- Parameters:
user
- the target user.item
- the candidate item (with its score).- Returns:
- the novelty value for the item.
-
update
Description copied from class:GlobalRankingGreedyReranker
Updates the value of the objective function after a selection.- Specified by:
update
in classGlobalRankingGreedyReranker<U,U>
- Parameters:
user
- the selected user.selectedItem
- the selected item and its score.
-