Packages

o

org.apache.spark.graphx.lib

LabelPropagation

object LabelPropagation

Label Propagation algorithm.

Source
LabelPropagation.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LabelPropagation
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. def run[VD, ED](graph: Graph[VD, ED], maxSteps: Int)(implicit arg0: ClassTag[ED]): Graph[VertexId, ED]

    Run static Label Propagation for detecting communities in networks.

    Run static Label Propagation for detecting communities in networks.

    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).

    ED

    the edge attribute type (not used in the computation)

    graph

    the graph for which to compute the community affiliation

    maxSteps

    the number of supersteps of LPA to be performed. Because this is a static implementation, the algorithm will run for exactly this many supersteps.

    returns

    a graph with vertex attributes containing the label of community affiliation