public class LabelPropagation
extends Object
Constructor and Description |
---|
LabelPropagation() |
public static <VD,ED> Graph<Object,ED> run(Graph<VD,ED> graph, int maxSteps, scala.reflect.ClassTag<ED> evidence$1)
Each node in the network is initially assigned to its own community. At every superstep, nodes send their community affiliation to all neighbors and update their state to the mode community affiliation of incoming messages.
LPA is a standard community detection algorithm for graphs. It is very inexpensive computationally, although (1) convergence is not guaranteed and (2) one can end up with trivial solutions (all nodes are identified into a single community).
graph
- the graph for which to compute the community affiliationmaxSteps
- the number of supersteps of LPA to be performed. Because this is a static
implementation, the algorithm will run for exactly this many supersteps.
evidence$1
- (undocumented)