Class CommunityReranker<U>
java.lang.Object
es.uam.eps.ir.relison.links.recommendation.reranking.global.swap.SwapReranker<U,I>
es.uam.eps.ir.relison.links.recommendation.reranking.global.swap.SwapGreedyReranker<U,I>
es.uam.eps.ir.relison.links.recommendation.reranking.global.swap.SwapLambdaReranker<U,U>
es.uam.eps.ir.relison.links.recommendation.reranking.global.swap.GraphSwapReranker<U>
es.uam.eps.ir.relison.links.recommendation.reranking.global.swap.comm.CommunityReranker<U>
- Type Parameters:
U
- type of the users
- All Implemented Interfaces:
GlobalReranker<U,U>
- Direct Known Subclasses:
AbstractCommunityDegreeGiniComplement
,AbstractCommunityEdgeGiniComplement
,AlternativeSemiCompleteCommunityEdgeGiniComplement
,OuterAlternativeSemiCompleteCommunityEdgeGiniComplement
,SizeNormalizedCompleteCommunityEdgeGiniComplement
,SizeNormalizedInterCommunityEdgeGiniComplement
,SizeNormalizedSemiCompleteCommunityEdgeGiniComplement
public abstract class CommunityReranker<U> extends GraphSwapReranker<U>
Swap reranker for modifying it according to the community metrics of the network.
-
Field Summary
Fields Modifier and Type Field Description protected Communities<U>
communities
Communities.protected MultiGraph<java.lang.Integer>
communityGraph
Community graph.protected boolean
selfloops
Indicates if self-loops are allowed or notFields inherited from class es.uam.eps.ir.relison.links.recommendation.reranking.global.swap.GraphSwapReranker
graph, recs
Fields inherited from class es.uam.eps.ir.relison.links.recommendation.reranking.global.swap.SwapLambdaReranker
novMap, novStats, relStats
Fields inherited from class es.uam.eps.ir.relison.links.recommendation.reranking.global.swap.SwapGreedyReranker
cutOff
Fields inherited from class es.uam.eps.ir.relison.links.recommendation.reranking.global.swap.SwapReranker
globalvalue
-
Constructor Summary
Constructors Constructor Description CommunityReranker(double lambda, int cutoff, java.util.function.Supplier<Normalizer<U>> norm, Graph<U> graph, Communities<U> communities, boolean selfloops)
Constructor -
Method Summary
Modifier and Type Method Description protected void
computeGlobalValue()
Computes the global value of the property we want to enhance.Methods inherited from class es.uam.eps.ir.relison.links.recommendation.reranking.global.swap.GraphSwapReranker
innerUpdate, nov, novAdd, novAddDelete, novDelete, rerankRecommendations, update
Methods inherited from class es.uam.eps.ir.relison.links.recommendation.reranking.global.swap.SwapLambdaReranker
rerankPermutation, selectItem, value, valuetop
Methods inherited from class es.uam.eps.ir.relison.links.recommendation.reranking.global.swap.SwapGreedyReranker
getBasePerm, rerankRecommendation
Methods inherited from class es.uam.eps.ir.relison.links.recommendation.reranking.global.swap.SwapReranker
update
-
Field Details
-
communities
Communities. -
communityGraph
Community graph. -
selfloops
protected boolean selfloopsIndicates if self-loops are allowed or not
-
-
Constructor Details
-
CommunityReranker
public CommunityReranker(double lambda, int cutoff, java.util.function.Supplier<Normalizer<U>> norm, Graph<U> graph, Communities<U> communities, boolean selfloops)Constructor- Parameters:
lambda
- a trade-off between the original score and the metric valuecutoff
- the number of items to reranknorm
- the normalization scheme.graph
- the original network.communities
- relation between communities and users.selfloops
- true if selfloops are allowed, false if they are not.
-
-
Method Details
-
computeGlobalValue
protected void computeGlobalValue()Description copied from class:GraphSwapReranker
Computes the global value of the property we want to enhance.- Specified by:
computeGlobalValue
in classGraphSwapReranker<U>
-