cdlib.evaluation.significance

significance(graph: <Mock id='140619399401168'>, communities: object, **kwargs) → object

Significance estimates how likely a partition of dense communities appear in a random graph.

Parameters:
  • graph – a networkx/igraph object
  • communities – NodeClustering object
Returns:

FitnessResult object

Example:

>>> from cdlib.algorithms import louvain
>>> from cdlib import evaluation
>>> g = nx.karate_club_graph()
>>> communities = louvain(g)
>>> mod = evaluation.significance(g,communities)
References:
  1. Traag, V. A., Aldecoa, R., & Delvenne, J. C. (2015). Detecting communities using asymptotical surprise. Physical Review E, 92(2), 022816.