bluegraph.core.analyse package

Reference page for the bluegraph.core.analyse package.

Graph metrics

class bluegraph.core.analyse.metrics.MetricProcessor

Abstract class for processing various graph metrics.

exception MetricProcessingException
exception MetricProcessingWarning
abstract betweenness_centrality(distance=None, write=False)

Compute (weighted) betweenness centrality.

abstract closeness_centrality(distance, write=False)

Compute (weighted) closeness centrality.

abstract degree_centrality(weight=None, write=False)

Compute (weighted) degree centrality.

classmethod from_graph_object(graph_object)

Instantiate a MetricProcessor directly from a Graph object.

abstract get_pgframe()

Get a new pgframe object from the wrapped graph object.

abstract pagerank_centrality(weight=None, write=False)

Compute (weighted) PageRank centrality.

Community Detection

class bluegraph.core.analyse.communities.CommunityDetector

Abstract class for a community detector.

This class provides a simple interface for detecting communities of densely connected nodes and evaluating community partitions.

Currently supported community detection strategies (methods not currently implemented by specific backends return PartitionError):

  • Louvain algorithm (strategy=”louvain”)

  • Girvan–Newman algorithm (strategy=”girvan-newman”)

  • Statistical inference (strategy=”sbm”)

  • Label propagation (strategy=”lpa”)

  • Hierarchical clustering (strategy=”hierarchical”)

Metrics for evaluation of partitions:

  • Modularity

  • Performance

  • Coverage


exception EvaluationError
exception EvaluationWarning
exception PartitionError
detect_communities(strategy='louvain', weight=None, n_communities=2, intermediate=False, write=False, write_property=None, **kwargs)

Detect community partition using the input strategy.