Skip to content

pitsianis/Leiden.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Julia Interface to Leiden

This package provides a Julia interface, (a wrapper) for the C++ implementation of the Leiden Algorithm for community detection, also known as graph clustering.

To learn more about the Leiden algorithm, see the article From Louvain to Leiden: guaranteeing well-connected communities, by V. A. Traag, L. Waltman & N. J. van Eck, 2019.

For the software library implementing the Leiden algorithm in C++ and Python, please visit the following link. It supports the following objective functions for graph clustering: Modularity (with a resolution parameter), the Constant Potts Model, and the imod function [2].

Supported platforms

Leiden.jl is available for the following platforms:

  • macOS x86_64 (x86_64-apple-darwin)
  • Linux x86_64 {libc=glibc} (x86_64-linux-gnu)

Installation

The package is currently under development and not available through the package manager of Julia. Instead, you have to manually add the two dependencies of this package and the package itself:

] add https://github.com/fcdimitr/igraph_jll.jl https://github.com/fcdimitr/leiden_jll.jl https://github.com/pitsianis/Leiden.jl 

Usage

The module exports a single function, leiden. The function is used to run a γ-specific search using Leiden. It returns a clustering configuration.

    leiden(A::SparseMatrixCSC, method[;
           γ = 1.0, gr_function = 0,
           Ω_0 = C_NULL, list_seed = 0:9, n_iter = 2])
  • method: a String specifying the clustering function. Options
    • ngrb: The modularity function with the resolution parameter γ.
    • cpm: The Constant Potts Model with the resolution parameter γ.
    • imod: The imod function described in [2], with the resolution parameter γ.

Optional parameters and their default values:

  • γ = 1.0 : The value of γ
  • gr_function = 0 : The function used in case the "imod" method is selected. See leiden_func_code for more information.
  • Ω_0 = C_NULL : Initial configuration equivalent to Ω_v where every node is a cluster.
  • list_seed = 0:9 : List of random number seeds to be used, one per run.
  • n_iter = 2 : Number of successive iterations to be used per seed.

MATLAB

A MATLAB wrapper is also available, under the directory matlab. Please check the instructions in the README file.

Contributing and Questions

Contributions are very welcome, as are feature requests and suggestions. Please open an issue if you encounter any problems.

References

[1] V. A. Traag, L. Waltman and N. J. van Eck, From Louvain to Leiden: guaranteeing well-connected communities, Scientific Reports volume 9, 2019

[2] T. Liu, D. Floros, N. Pitsianis and X. Sun, "Digraph Clustering by the BlueRed Method," 2021 IEEE High Performance Extreme Computing Conference (HPEC), 2021, pp. 1-7, doi: 10.1109/HPEC49654.2021.9622834.

Contributors of the Julia interface

Design and development:
Nikos Pitsianis1,2, Dimitris Floros1, Xiaobai Sun2

1 Department of Electrical and Computer Engineering, Aristotle University of Thessaloniki, Thessaloniki 54124, Greece
2 Department of Computer Science, Duke University, Durham, NC 27708, USA

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published