Label Propagation

The Label Propagation algorithm detects structures in a graph by propagating labels throughout the graph and forming groups based on the label propagation.

Label Propagation Syntax

Graph algorithms are accessed from an internal SPARQL service endpoint. To incorporate the Label Propagation algorithm in a query, include a SERVICE statement in the WHERE clause. The service call specifies the name of the algorithm and defines the required and optional property values for that algorithm.

Use the following syntax in the SERVICE clause to find the groups in a graph. The table below describes each property.

SERVICE <csi:label_propagation>
  {
    [] <csi:binding-vertex>  ?vertex_variable_name ;
       <csi:binding-label>   ?label_variable_name ;
       <csi:edge-label>      <edge_uri> ;
     [ <csi:max-iterations>  number_of_iterations ] .
}
Property Range Description
<csi:binding-vertex> variable Required property that defines the name to use for the result column that lists the source nodes or vertices.
<csi:binding-label> variable Required property that defines the name to use for the result column that lists the assigned label values.
<csi:edge-label> URI Required property that lists the edge URI that defines the graph to operate on. The graph is the set of vertices that are connected by this URI.
<csi:max-iterations> 1 - 100 Optional property that specifies the maximum number of times to iterate through the graph. The default value is 5.