alexbovet / flow_stability

Flow stability framework for dynamic community detection in temporal networks
GNU Lesser General Public License v3.0
24 stars 4 forks source link

flowstab - Flow stability for dynamic community detection

Python package for the dynamic community detection in temporal networks implementing the flow stability framework described in

Alexandre Bovet, Jean-Charles Delvenne & Renaud Lambiotte, Flow stability for dynamic community detection, Sci. Adv., 8 (19), eabj3063. DOI: 10.1126/sciadv.abj3063

Requirements:

Installation

You can pip install flowstab directly from this repository into your virtual environment. Simply run:

pip install git+https://github.com/alexbovet/flow_stability.git

Usage

After installation you can access the relevant classes and methods by importing flowstab into your python scripts or via command line (see CLI scripts for details).

If you want to use the FlowIntegralClustering class, for example, you would want to add the following line in your script:


from flowstab.FlowStability import FlowIntegralClustering

# forw_flow = FlowIntegralClustering(...

Refer to the examples folder more detailed usage examples.

CLI scripts

flowstab provides also several command line hooks that can be run directly in the terminal after installation without the need of opening a python shell:

run_clusterings

This command requires sparse_dot_mkl which relies on the closed-source libmkl_rt.so library. In Ubuntu you might need to fetch this library with apt-get install libmkl-rt.

run_cov_integrals

run_laplacians_transmats

Content

The main classes are:

Additional interesting classes and functions are:

A jupyter notebook reproducing the example from Fig. 2 of the paper is available in asymmetric_example.ipynb.

DOI