Community Detection Algorithms
Community detection algorithms evaluate clusters of nodes and determine whether they have a tendency to strengthen or break apart:
- Connected Components: Identifies the connected nodes in an undirected graph.
- Label Propagation: Detects structures in a graph by propagating labels throughout the graph and forming groups based on the label propagation.
- Triangle Enumeration: Identifies each triangle in a graph.
- Triangle Count: Determines the number of triangles that a graph includes and calculates the average clustering coefficient for the resulting network of nodes.
- Vertex Triangle Count: Determines the number of triangles that a vertex is a member of and computes the clustering coefficient for the vertex.
Connected Components
The Connected Components algorithm identifies the connected vertices in an undirected graph. The algorithm returns a unique connected component ID for each vertex in the graph.
Syntax
To incorporate the Connected Components algorithm in a query, include the following SERVICE call in the WHERE clause.
SERVICE <csi:connected_components> { [] <csi:binding-vertex> ?binding_vertex_variable ; <csi:binding-id> ?component_id_variable ; <csi:edge-label> <edge_uri> ; [ <csi:graph> <graph_uri> ] . }
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.
Syntax
To incorporate the Label Propagation algorithm in a query, include the following SERVICE call in the WHERE clause.
SERVICE <csi:label_propagation> { [] <csi:binding-vertex> ?vertex_variable ; <csi:binding-label> ?label_variable ; <csi:edge-label> <edge_uri> ; [ <csi:max-iterations> number_of_iterations ] . }
Triangle Enumeration
The Triangle Enumeration algorithm identifies each of the triangles that exist in the specified graph. A triangle is defined as three nodes that are connected by three edges (a-b, b-c, c-a).
Syntax
To incorporate the Triangle Enumeration algorithm in a query, include the following SERVICE call in the WHERE clause.
SERVICE <csi:triangles> { [] <csi:binding-vertex1> ?vertex1_variable ; <csi:binding-vertex2> ?vertex2_variable ; <csi:binding-vertex3> ?vertex3_variable ; <csi:edge-label> <edge_uri> . }
Triangle Count
The Triangle Count algorithm determines the number of triangles that a graph includes and calculates the average clustering coefficient for the resulting network of nodes. A triangle is defined as three nodes that are connected by three edges (a-b, b-c, c-a).
Syntax
To incorporate the Triangle Count algorithm in a query, include the following SERVICE call in the WHERE clause.
SERVICE <csi:triangles> { [] <csi:binding-average-clustering-coefficient> ?binding_avg_cc_variable ; <csi:binding-triangle-count> ?triangle_count_variable ; <csi:edge-label> <edge_uri> . }
Vertex Triangle Count
The Vertex Triangle Count algorithm counts number of triangles that a vertex is a member of and computes the clustering coefficient for the vertex. A triangle is defined as three nodes that are connected by three edges (a-b, b-c, c-a).
Syntax
To incorporate the Vertex Triangle Count algorithm in a query, include the following SERVICE call in the WHERE clause.
SERVICE <csi:triangles> { [] <csi:binding-vertex> ?vertex_variable ; <csi:binding-vertex-triangle-count> ?triangle_count_variable ; <csi:binding-clustering-coefficient> ?binding_cc_variable ; <csi:edge-label> <edge_uri> . }