Skip to main content

NetLSD descriptors for graphs. Compare and analyze graph structure on multiple levels!

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

NetLSD-1.0.1.tar.gz (6.0 kB view details)

Uploaded Source

File details

Details for the file NetLSD-1.0.1.tar.gz.

File metadata

  • Download URL: NetLSD-1.0.1.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for NetLSD-1.0.1.tar.gz
Algorithm Hash digest
SHA256 212f4a0b2752d2626eb745d5835cad29f8a68e218af2053ed0fe21deb2b5e328
MD5 dbc2f9192f397e804e924d7768756520
BLAKE2b-256 4ea54bee7a8dc572720f3a33db85a079d1465fdf3ea3a9b076c46bfdbbc86e92

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page