• Stars
    star
    370
  • Rank 115,405 (Top 3 %)
  • Language
    Python
  • License
    BSD 2-Clause "Sim...
  • Created almost 6 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Community Discovery Library

CDlib - Community Discovery Library

codecov Build Documentation Status CodeQL pyversions PyPI version Anaconda-Server Badge Code style: black Downloads Downloads DOI SBD++

Twitter

CDlib is a meta-library for community discovery in complex networks: it implements algorithms, clustering fitness functions as well as visualization facilities.

CDlib is designed around the networkx python library: however, when needed, it takes care to automatically convert (from and to) igraph object so to provide an abstraction on specific algorithm implementations to the final user.

CDlib provides a standardized input/output facilities for several Community Discovery algorithms: whenever possible, to guarantee literature coherent results, implementations of CD algorithms are inherited from their original projects (acknowledged on the documentation).

If you use CDlib as support to your research consider citing:

G. Rossetti, L. Milli, R. Cazabet. CDlib: a Python Library to Extract, Compare and Evaluate Communities from Complex Networks. Applied Network Science Journal. 2019. DOI:10.1007/s41109-019-0165-9

Tutorial and Online Environments

Check out the official tutorial to get started!

If you would like to test CDlib functionalities without installing anything on your machine consider using the preconfigured Jupyter Hub instances offered by SoBigData++.

Installation

CDlib requires python>=3.8.

To install the latest version of our library just download (or clone) the current project, open a terminal and run the following commands:

pip install -r requirements.txt
pip install -r requirements_optional.txt # (Optional) this might not work in Windows systems due to C-based dependencies.
pip install .

Alternatively use pip

pip install cdlib

or conda

conda config --add channels giuliorossetti
conda config --add channels conda-forge
conda install cdlib

Optional Dependencies (pip package)

CDlib relies on a few packages calling C code that can be cumbersome to install on Windows machines: to address such issue, the default installation does not try to install set up such requirements.

Such a choice has been made to allow (even) non *unix user to install the library and get access to its core functionalities.

To integrate the standard installation with you can either:

  • (Windows) manually install the optional packages (versions details are specified in requirements_optional.txt) following the original projects guidelines, or
  • (Linux/OSX) run the command:
pip install cdlib[C]

Such caveat will install everything that can be easily automated under Linux/OSX.

(Advanced)

Graph-tool

The only optional dependency that will remain unsatisfied following the previous procedures will be graph-tool (used to add SBM models). If you need it up and running, refer to the official documentation and install the conda-forge version of the package.

ASLPAw

Since its 2.1.0 release ASLPAw relies on gmpy2 whose installation through pip is not easy to automatize due to some C dependencies. To address such issue test the following recipe:

conda install gmpy2 
pip install shuffle_graph>=2.1.0 similarity-index-of-label-graph>=2.0.1 ASLPAw>=2.1.0

In case this does not solve the issue, please refer to the official gmpy2 installation instructions.

Optional Dependencies (Conda package)

CDlib relies on a few packages not available through conda: to install it please use pip:

pip install pycombo
pip install GraphRicciCurvature

conda install gmpy2 
pip install shuffle_graph>=2.1.0 similarity-index-of-label-graph>=2.0.1 ASLPAw>=2.1.0

In case ASLPAw installation fails, please refer to the official gmpy2 installation instructions.

Collaborate with us!

CDlib is an active project, any contribution is welcome!

If you like to include your model in CDlib feel free to fork the project, open an issue and contact us.

How to contribute to this project?

Contributing is good, doing it correctly is better! Check out our rules, issue a proper pull request /bug report / feature request.

We are a welcoming community... just follow the Code of Conduct.

More Repositories

1

ndlib

Network Diffusion Library - (for NetworkX and iGraph)
Python
273
star
2

dynetx

Dynamic Network Analysis library
Python
106
star
3

TILES

TILES: an algorithm for community discovery in dynamic social networks
Python
56
star
4

DEMON

DEMON: a local-first discovery method for overlapping communities.
Python
33
star
5

tbp-next-basket

TARS based prediction for Next Basket
Python
23
star
6

RDyn

RDyn: graph benchmark handling community dynamics
Python
22
star
7

f1-communities

A novel approach to evaluate community detection algorithms on ground truth
Python
21
star
8

Eva

Eva: Community Discovery for Labeled Graphs (networkx implementation)
Python
14
star
9

ASH

Attributed Stream Hypergraph
Python
13
star
10

pynotify

Python decorator that notifies via email the termination of a function
Python
12
star
11

ndlib-rest

Network Diffusion Library REST Service
Python
12
star
12

partition_quality

Quality scores to evaluate network partitions
Python
12
star
13

UAB_Complex_Network_Analysis

P.h.D. course on "Complex Network Analysis" @ Universitat Autònoma de Barcelona (2022)
Jupyter Notebook
12
star
14

Python-Project-Template

Minimal template for a Python library project
Python
11
star
15

Social-Network-Analsysis-Laboratory

Docker container exposing a preconfigured python environment for Social Network Analysis
Dockerfile
9
star
16

conformity

Conformity: a Path-Aware Homophily measure for Node-Attributed Networks
Python
8
star
17

AGraphlets

Approximate Graphlets Extraction
Python
6
star
18

cdlib_datasets

Network datasets with ground truth clusterings
6
star
19

ANGEL

ANGEL: Advanced Network Groups Estimate and Localization
Python
6
star
20

PDS_notebooks

Programming For DataScience (UniPi)
Jupyter Notebook
4
star
21

leader_detect

The Three Dimensions of Social Prominence
Python
3
star
22

SoBigData_courses

Jupyter Notebook
3
star
23

GiulioRossetti

2
star
24

Humane-AI-Net_SBD_Tutorial

SDAA 2021 - SBD++ Tutorial
Jupyter Notebook
2
star
25

DIPSCO_Python_Data_Analysis

Introductory course on Data Analysis in Python @ DIPSCO
Jupyter Notebook
2
star
26

cdlib_rest

Python
1
star
27

hit-savvy

Hit-Savvy detection and Success prediction
Python
1
star
28

SciDataCon_SBD_HandsOn

SoBigData++ Hands-on session @SciDataCon2021
Jupyter Notebook
1
star
29

AlgorithmicBias

Jupyter Notebook
1
star
30

IULM_Social_Network_Analysis_2021

Jupyter Notebook
1
star
31

giuliorossetti.github.io

HTML
1
star