Coder Social home page Coder Social logo

clustering-reordering's Introduction

Clustering & Reordering

Prerequisites:

Make sure to have the igraph library. (installation guide)

Installation:

sh$ make
gcc -Wall -Werror -Wextra -std=c99 -pedantic -fsanitize=address -g -I/usr/local/include/igraph    -c -o src/main.o src/main.c
gcc -Wall -Werror -Wextra -std=c99 -pedantic -fsanitize=address -g -I/usr/local/include/igraph    -c -o src/clustering.o src/clustering.c
gcc -Wall -Werror -Wextra -std=c99 -pedantic -fsanitize=address -g -I/usr/local/include/igraph    -c -o src/reorder.o src/reorder.c
gcc -Wall -Werror -Wextra -std=c99 -pedantic -fsanitize=address -g -I/usr/local/include/igraph    -c -o src/utils.o src/utils.c
gcc -Wall -Werror -Wextra -std=c99 -pedantic -fsanitize=address -g -I/usr/local/include/igraph  -L/usr/local/lib -ligraph  ./src/main.o ./src/clustering.o ./src/reorder.o ./src/utils.o -o ./vlg

Usage:

sh$ ./vlg graph_path [vertex_reorder_id vertex_type]

Where ’vertex_reorder_id’ is the id of the vertex used asthe reordering root and ’vertex_type’ is the type of this node (center, peripheral, min_degree, max_degree, ...)

Note: 'vertex_reorder_id' and 'vertex_type' are optional. If they are not given, the program will run Louvain without reordering.

Example:

run on inet graph without reordering

sh$ ./vlg main_comp/inet 
[info] Loading main_comp/inet
[info] Loaded main_comp/inet
[info] Computing main component
[info] Computed main component
[info] Applying Louvain
[result] louvain time: 55.058344
[result] modularity: 0.710001
[result] number of communities: 446
[info] Saving stats in records.csv

run on inet graph with reordering at center node 5

sh$ ./vlg main_comp/inet 5 center
[info] Loading main_comp/inet
[info] Loaded main_comp/inet
[info] Computing main component
[info] Computed main component
[info] Applying reorder at index : 5
[info] Reorder time: 8.356778
[info] Applying Louvain
[result] louvain time: 80.718625
[result] modularity: 0.725551
[result] number of communities: 197
[info] Saving stats in records.csv

Authors:

clustering-reordering's People

Contributors

the-mams avatar yassram avatar

Stargazers

 avatar

Watchers

 avatar  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.