Coder Social home page Coder Social logo

esadr / ml-sparsifier Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jayson-huang/ml-sparsifier

0.0 2.0 0.0 5.45 MB

Multilevel Graph Sparsifier based on algebraic distances on graphs

License: MIT License

C++ 83.63% Makefile 1.79% Python 12.24% C 0.32% Shell 2.01%

ml-sparsifier's Introduction

Implementation of Single-level and Multilevel sparsification. See paper here: http://arxiv.org/abs/1601.05527

Note: This project is still in development.

To build:

make

To run:

For single-level: ./msparse -i ~/test_graphs/fb-uf.edges -n 35111 --zero-index --gname fb-uf -o out.edges -s 0.4 --single-level --weak

For multi-level ./msparse -i ~/test_graphs/fb-uf.edges -n 35111 --zero-index --gname fb-uf -o out.edges --param-list 0.1,0.1,0.1 --weak

To set number of openmp threads (set to 8 by default) export OMP_NUM_THREADS=16

To disable openmp, remove '-fopenmp' from LFLAGS in Makefile

Notes:

==> Param list starts from coarsest level

==> c++11 required (version g++ 4.8 or over)

==> Graph file must already be undirected, node numbering has to be continuous and need only contain one direction of relationship e.g

Good graph file
	1 2
	3 4
	5 3

Bad graph file
	1 2
	2 1
	3 4
	4 3
	5 3
	3 5
graph files (edge list) can also contain 3rd column for weights.

==> Space delimeter is used by default. To change to tab use --delim tab

==> Weak + Strong edges sparsified by default.

Options

--weak: retain weak edges --strong: Retain strong edges --normalize: normalize algebraic distance by product of degrees.

-i - path of input graph -n - number of nodes --gname - shortname for graph. --zero-index - index of first node starts at 0. --permute - random shuffle node ordering -r - interpolation order. Default 1. --delim - delimeter of input file. Only space or tab allowed.

See Main.cpp for all available options.

Output:

sparsified graph

ml-sparsifier's People

Contributors

emmanuj avatar

Watchers

James Cloos avatar Ehsan SadrFaridpour 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.