Giter Club home page Giter Club logo

netlsd's Introduction

NetLSD

NetLSD is a family of spectral graph descriptros. Given a graph, NetLSD computes a low-dimensional vector representation that can be used for different tasks.

Quick start

import netlsd
import networkx as nx

g = nx.erdos_renyi_graph(100, 0.01) # create a random graph with 100 nodes
descriptor = netlsd.heat(g) # compute the signature

That's it! Then, signatures of two graphs can be compared easily. NetLSD supports networkx, graph_tool, and igraph packages natively.

import netlsd
import numpy as np

distance = netlsd.compare(desc1, desc2) # compare the signatures using l2 distance
distance = np.linalg.norm(desc1 - desc2) # equivalent

For more advanced usage, check out online documentation.

Requirements

  • numpy
  • scipy

Installation

  1. cd netlsd
  2. pip install -r requirements.txt
  3. python setup.py install

Or simply pip install netlsd

Citing

If you find NetLSD useful in your research, we ask that you cite the following paper:

@inproceedings{Tsitsulin:2018:KDD,
 author={Tsitsulin, Anton and Mottin, Davide and Karras, Panagiotis and Bronstein, Alex and M{\"u}ller, Emmanuel},
 title={NetLSD: Hearing the Shape of a Graph},
 booktitle = {Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining},
 series = {KDD '18},
 year = {2018},
}

Misc

NetLSD - Hearing the shape of graphs.

netlsd's People

Contributors

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