Class GiniWeightedFastGreedy<U>
java.lang.Object
es.uam.eps.ir.relison.sna.community.detection.modularity.balanced.GiniWeightedFastGreedy<U>
- Type Parameters:
U
- Type of the users
- All Implemented Interfaces:
CommunityDetectionAlgorithm<U>
,DendogramCommunityDetectionAlgorithm<U>
public class GiniWeightedFastGreedy<U> extends java.lang.Object implements CommunityDetectionAlgorithm<U>, DendogramCommunityDetectionAlgorithm<U>
Alternative version of Fast Greedy algorithm for optimizing modularity, taking into account the Gini of the size
of communities.
-
Field Summary
Fields Modifier and Type Field Description private double
lambda
The weight for the Gini termprivate int
optimalNumComms
The optimal number of communities. -
Constructor Summary
Constructors Constructor Description GiniWeightedFastGreedy(double lambda)
Constructor. -
Method Summary
Modifier and Type Method Description Communities<U>
detectCommunities(Graph<U> graph)
Computes the communities for a certain graph.Dendogram<U>
detectCommunityDendogram(Graph<U> graph)
Computes the community dendogram for a certain graph.
-
Field Details
-
lambda
private final double lambdaThe weight for the Gini term -
optimalNumComms
private int optimalNumCommsThe optimal number of communities.
-
-
Constructor Details
-
GiniWeightedFastGreedy
public GiniWeightedFastGreedy(double lambda)Constructor.- Parameters:
lambda
- the weight of the Gini term.
-
-
Method Details
-
detectCommunities
Description copied from interface:CommunityDetectionAlgorithm
Computes the communities for a certain graph.- Specified by:
detectCommunities
in interfaceCommunityDetectionAlgorithm<U>
- Parameters:
graph
- The full graph.- Returns:
- The communities if everything went OK, null if not.
-
detectCommunityDendogram
Description copied from interface:DendogramCommunityDetectionAlgorithm
Computes the community dendogram for a certain graph.- Specified by:
detectCommunityDendogram
in interfaceDendogramCommunityDetectionAlgorithm<U>
- Parameters:
graph
- The full graph.- Returns:
- The dendogram if everything went OK, null if not.
-