Code Monkey home page Code Monkey logo

contiguity-constrained-clustering's Introduction

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.

contiguity-constrained-clustering's People

Contributors

ellingtonkirby avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.