cdlib.algorithms.mod_m

mod_m(g_original: object, query_node: object) → cdlib.classes.node_clustering.NodeClustering

Community Discovery algorithm designed to find local optimal community structures in large networks starting from a given source vertex.

Supported Graph Types

Undirected Directed Weighted
Yes No No
Parameters:
  • g_original – a networkx/igraph object
  • query_node – Id of the network node whose local community is queried.
Returns:

NodeClustering object

Example:
>>> from cdlib import algorithms
>>> import networkx as nx
>>> G = nx.karate_club_graph()
>>> coms = algorithms.mod_m(G, 1)
References:

Luo, Feng, James Z. Wang, and Eric Promislow. “Exploring local community structures in large networks.” Web Intelligence and Agent Systems: An International Journal 6.4 (2008): 387-400.

Note

Reference implementation: https://github.com/mahdi-zafarmand/LSWL