cdlib.algorithms.belief

cdlib.algorithms.belief(g_original: object, max_it: int = 100, eps: float = 0.0001, reruns_if_not_conv: int = 5, threshold: float = 0.005, q_max: int = 7) NodeClustering

Belief community seeks the consensus of many high-modularity partitions. It does this with a scalable message-passing algorithm, derived by treating the modularity as a Hamiltonian and applying the cavity method.

Supported Graph Types

Undirected

Directed

Weighted

Yes

No

No

Parameters:
  • g_original – a networkx/igraph object

  • max_it

  • eps

  • reruns_if_not_conv

  • threshold

  • q_max

Returns:

NodeClustering object

Example:

>>> from cdlib import algorithms
>>> import networkx as nx
>>> G = nx.karate_club_graph()
>>> coms = algorithms.belief(G)
References:

Zhang, Pan, and Cristopher Moore. “Scalable detection of statistically significant communities and hierarchies, using message passing for modularity.” Proceedings of the National Academy of Sciences 111.51 (2014): 18144-18149.