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 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 | Description | Range & Default Value |
---|---|---|
<csi:binding-vertex> | Required property that defines the name to use for the result column that lists the source nodes or vertices. | Range: Must be a variable name Default: none |
<csi:binding-label> | Required property that defines the name to use for the result column that lists the assigned label values. | Range: Must be a variable name Default: none |
<csi:edge-label> | 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. | Range: Must be a URI Default: none |
<csi:max-iterations> | Optional property that specifies the maximum number of times to iterate through the graph. | Range: 1 - 100 Default: 5 |