Git Product home page Git Product logo

sunbeam's Introduction

SuNBEaM

This package provides code to compute the (S)pectral (N)on-(B)acktracking (E)igenvalue Pseudo-(M)etric, or SuNBEaM for short. The non-backtracking matrix is a matrix representation of a graph that has deep connections with the theory of the length spectrum. The eigenvalues of the non-backtracking matrix can be effectively used to compute dissimilarity scores (or distances) between graphs. For more information, see

Leo Torres, P. Suárez Serrato, and T. Eliassi-Rad, Graph Distance from the Topological View of Non-Backtracking Cycles, preprint, arXiv:1807.09592 [cs.SI], (2018).

All experiments and figures in this paper were generated with an earlier version of the code in this repository.

random eigenvalues

Installation

To install, simply git clone this repository, import the sunbeam module and call the nbdist function. For sunbeam to work correctly you need to have installed NumPy, SciPy, NetworkX, and (optionally) Matplotlib.

Example

A minimal example of how to use sunbeam.py:

import sunbeam
import networkx as nx
er = nx.erdos_renyi_graph(300, 0.05)
ba = nx.barabasi_albert_graph(300, 3)
sunbeam.nbdist(er, ba, 20)                      # 15.327196615382533
sunbeam.nbdist(er, ba, 20, sigma=11, eta=0.6)   # 596.05874770609171

A more extensive example of the functionality provided in sunbeam.py can be found in the example notebook.

sunbeam's People

Contributors

leotrs avatar

Watchers

Everardo J. Barojas M. 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.