cdlib.algorithms.infomap_bipartite

infomap_bipartite(g_original: object, flags: str = '') → cdlib.classes.bipartite_node_clustering.BiNodeClustering

Infomap is based on ideas of information theory. The algorithm uses the probability flow of random walks on a bipartite network as a proxy for information flows in the real system and it decomposes the network into modules by compressing a description of the probability flow.

Supported Graph Types

Undirected Directed Weighted Bipartite
Yes Yes Yes Yes
Parameters:
  • g_original – a networkx/igraph object
  • flags – str flags for Infomap
Returns:

BiNodeClustering object

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

Rosvall M, Bergstrom CT (2008) Maps of random walks on complex networks reveal community structure. Proc Natl Acad SciUSA 105(4):1118–1123

Note

Reference implementation: https://pypi.org/project/infomap/

Note

Infomap Python API documentation: https://mapequation.github.io/infomap/python/