graph.markov_cluster — Markov Clustering Algorithm

The graph.markov_cluster module implements a markov based walk method to compute graph clusters.

New in version 0.1.0.

autocnet.graph.markov_cluster.mcl(g, expand_factor=2, inflate_factor=2, max_loop=10, mult_factor=1)[source]

Markov Cluster Algorithm

Implementation modified from: https://github.com/koteth/python_mcl Originally released under the MIT license (https://opensource.org/licenses/MIT)

Parameters
  • g (object or ndarray) – NetworkX graph object or adjacency matrix

  • inflate_factor (float) – Parameter to strengthen and weaken flow between nodes. The larger the value the more granular the resultant clusters are.

  • expand_factor (int) – Parameter to manage flow connection between different regions of the graph.

  • mult_factor (int) – Value to set for self loops. That is, the flow between a node and itself.

  • max_loop (int) – Number of iterations to perform before terminating (or convergence).

Returns

  • arr (ndarray) – arr normalized flow matrix computed after convergence or max_loop is exceeded.

  • clusters (dict) – of clusters where the key is an arbitrary cluster identifier and the value is a list of node identifiers.

References

[Stijn2000] [Stijn2000a]