K- the Vertex ID type
public class CommunityDetection<K> extends Object implements GraphAlgorithm<K,Long,Double,Graph<K,Long,Double>>
The Vertex values of the input Graph provide the initial label assignments.
Initially, each vertex is assigned a tuple formed of its own initial value along with a score equal to 1.0. The vertices propagate their labels and max scores in iterations, each time adopting the label with the highest score from the list of received messages. The chosen label is afterwards re-scored using the fraction delta/the superstep number. Delta is passed as a parameter and has 0.5 as a default value.
|Constructor and Description|
Creates a new Community Detection algorithm instance.
public CommunityDetection(int maxIterations, double delta)
maxIterations- The maximum number of iterations to run.
delta- The hop attenuation parameter. Its default value is 0.5.
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.