Skip to content

EllingtonKirby/Contiguity-Constrained-Clustering

Repository files navigation

Testing and Evaluating Contiguity Constrained Clustering

This repository contains the tests and experiments of the Contiguity Constrained Clustering method. This method is based on the Leiden algorithm, with a modified objective function based on Ward's Linkage.

This repository tests the Leiden algorithm with Modularity, Wards Linkage, and Contiguity Constrained Clustering on two datasets.

Build

The requirements.txt contains all the dependencies except for the locally bundled libraries.

This repository has certain expectations of bundled libraries.

First is the usage of the Leidenalg built by Traag et al. I use a fork of both their python layer Ledienalg here and the C++ layer Libleidenalg located here

The build_libleidenalg.sh script has been modified to import my version of the libleidenalg

The build system is a bit hackish, but what is in build_local.sh should more or less work if you replace the CONDA_DIR variable with the path to your conda directory.

Basically you need to manually move the dylib generated by the build_libleidenalg.sh and pip install everytime you rebuild the project.

Otherwise this project expects the Barcelona data in the Barcelona/ directory and the Shenzen data in the data/ directory.

Caveats

The current method for detecting disconnected communities is extremely inefficient. However given that I was testing only on networks of 600-1500 nodes, it was not an issue. However to use this method on much larger networks, optimizations of this method will need to be made, likely some form of memoization.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages