Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xgfs/NetLSD
NetLSD descriptors for graphs. Compare and analyze graph structure on multiple levels!
https://github.com/xgfs/NetLSD
Last synced: 19 days ago
JSON representation
NetLSD descriptors for graphs. Compare and analyze graph structure on multiple levels!
- Host: GitHub
- URL: https://github.com/xgfs/NetLSD
- Owner: xgfs
- License: mit
- Created: 2018-06-04T14:55:57.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-26T18:46:44.000Z (over 4 years ago)
- Last Synced: 2024-09-18T05:02:07.880Z (2 months ago)
- Language: Python
- Homepage:
- Size: 22.5 KB
- Stars: 59
- Watchers: 8
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Contributing: docs/contributing.rst
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-graph-classification - [Python Reference
README
===============================
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
-----------.. code-block:: python
import netlsd
import networkx as nxg = nx.erdos_renyi_graph(100, 0.01) # create a random graph with 100 nodes
descriptor = netlsd.heat(g) # compute the signatureThat's it! Then, signatures of two graphs can be compared easily. NetLSD supports `networkx `_, `graph_tool `_, and `igraph `_ packages natively.
.. code-block:: python
import netlsd
import numpy as npdistance = netlsd.compare(desc1, desc2) # compare the signatures using l2 distance
distance = np.linalg.norm(desc1 - desc2) # equivalentFor more advanced usage, check out `online documentation `_.
Requirements
------------
* numpy
* scipyInstallation
------------
#. cd netlsd
#. pip install -r requirements.txt
#. python setup.py installOr 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.
* MIT license
* Documentation: http://netlsd.readthedocs.org