Class CommunityEdgeGini<U>
java.lang.Object
es.uam.eps.ir.relison.sna.metrics.communities.graph.gini.edges.CommunityEdgeGini<U>
- Type Parameters:
U
- Type of the users.
- All Implemented Interfaces:
CommunityMetric<U>
- Direct Known Subclasses:
CompleteCommunityEdgeGini
,InterCommunityEdgeGini
,SemiCompleteCommunityEdgeGini
public abstract class CommunityEdgeGini<U> extends java.lang.Object implements CommunityMetric<U>
Computes the community edge Gini of the graph, i.e. the Gini coefficient for the
number of edges between each pair of communities.
References:
- J. Sanz-Cruzado, P. Castells. Beyond accuracy in link prediction. 3rd Workshop on Social Media for Personalization and Search (SoMePEaS 2019).
- J. Sanz-Cruzado, P. Castells. Enhancing structural diversity in social networks by recommending weak ties. 12th ACM Conference on Recommender Systems (RecSys 2018),pp. 233-241 (2018)
- J. Sanz-Cruzado, S.M. Pepa, P. Castells. Structural novelty and diversity in link prediction. 0th International Workshop on Modeling Social Media (MSM 2018) at The Web Conference (WWW 2018)
-
Field Summary
Fields Modifier and Type Field Description private EdgeGiniMode
mode
EdgeGini execution mode.private boolean
selfloops
Indicates if autoloops are allowed. -
Constructor Summary
Constructors Constructor Description CommunityEdgeGini(EdgeGiniMode mode, boolean selfloops)
Constructor. -
Method Summary
Modifier and Type Method Description double
compute(Graph<U> graph, Communities<U> comm)
Computes the value of the metric in the graph.
-
Field Details
-
mode
EdgeGini execution mode.- See Also:
EdgeGiniMode
-
selfloops
private final boolean selfloopsIndicates if autoloops are allowed.
-
-
Constructor Details
-
CommunityEdgeGini
Constructor.- Parameters:
mode
- EdgeGini execution mode.selfloops
- true if autoloops are allowed, false if they are not.
-
-
Method Details
-
compute
Description copied from interface:CommunityMetric
Computes the value of the metric in the graph.- Specified by:
compute
in interfaceCommunityMetric<U>
- Parameters:
graph
- Graph.comm
- Communities of the graph.- Returns:
- the value of the metric.
-