Skip to main content
https://readthedocs.org/projects/pygsp/badge/?version=latest https://img.shields.io/pypi/v/pygsp.svg https://zenodo.org/badge/16276560.svg https://img.shields.io/pypi/l/pygsp.svg https://img.shields.io/pypi/pyversions/pygsp.svg

https://img.shields.io/travis/epfl-lts2/pygsp.svg https://img.shields.io/coveralls/epfl-lts2/pygsp.svg https://img.shields.io/github/stars/epfl-lts2/pygsp.svg?style=social

The PyGSP is a Python package to ease Signal Processing on Graphs (a Matlab counterpart exists). It is a free software, distributed under the BSD license, and available on PyPI. The documentation is available on Read the Docs and development takes place on GitHub.

The PyGSP facilitates a wide variety of operations on graphs, like computing their Fourier basis, filtering or interpolating signals, plotting graphs, signals, and filters. Its core is spectral graph theory, and many of the provided operations scale to very large graphs. The package includes a wide range of graphs, from point clouds like the Stanford bunny and the Swiss roll; to networks like the Minnesota road network; to models for generating random graphs like stochastic block models, sensor networks, Erdős–Rényi model, Barabási-Albert model; to simple graphs like the path, the ring, and the grid. Many filter banks are also provided, e.g. various wavelets like the Mexican hat, Meyer, Half Cosine; some low-pass filters like the heat kernel and the exponential window; and Gabor filters. Despite all the pre-defined models, you can easily use a custom graph by defining its adjacency matrix, and a custom filter bank by defining a set of functions in the spectral domain.

The following demonstrates how to instantiate a graph and a filter, the two main objects of the package.

>>> from pygsp import graphs, filters
>>> G = graphs.Logo()
>>> G.estimate_lmax()
>>> g = filters.Heat(G, tau=100)

Let’s now create a graph signal: a set of three Kronecker deltas for that example. We can now look at one step of heat diffusion by filtering the deltas with the above defined filter. Note how the diffusion follows the local structure!

>>> import numpy as np
>>> DELTAS = [20, 30, 1090]
>>> s = np.zeros(G.N)
>>> s[DELTAS] = 1
>>> s = g.filter(s)
>>> G.plot_signal(s, highlight=DELTAS, backend='matplotlib')

Please see the tutorials for more usage examples and the reference guide for an exhaustive documentation of the API. Enjoy the package!

Installation

The PyGSP is available on PyPI:

$ pip install pygsp

Note that you will need a recent version of pip and setuptools. Please run pip install --upgrade pip setuptools if you get any installation error.

Contributing

See the guidelines for contributing in CONTRIBUTING.rst.

Acknowledgments

The PyGSP was started in 2014 as an academic open-source project for research purpose at the EPFL LTS2 laboratory. This project has been partly funded by the Swiss National Science Foundation under grant 200021_154350 “Towards Signal Processing on Graphs”.

If you are using the library for your research, for the sake of reproducibility, please cite the version you used as indexed by Zenodo.

Download files

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

Source Distribution

PyGSP-0.5.0.tar.gz (1.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

PyGSP-0.5.0-py2.py3-none-any.whl (1.8 MB view details)

Uploaded Python 2Python 3

File details

Details for the file PyGSP-0.5.0.tar.gz.

File metadata

  • Download URL: PyGSP-0.5.0.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for PyGSP-0.5.0.tar.gz
Algorithm Hash digest
SHA256 77ba039e2a6134b6202a48e8e64eaecc480cfa51ae69dd1c5616a0601ffb8d44
MD5 0129becee3d395facf180ff880f01b08
BLAKE2b-256 d3c30934a4cd48c3c338b4a213e57aa96d46560bb53d4699e67ccd2ece9152eb

See more details on using hashes here.

File details

Details for the file PyGSP-0.5.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for PyGSP-0.5.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 697368e5ae3f313a42f2ee28f648f2025e22660320e465dcf5c4c99fbf6bd138
MD5 47e0cf6737084d44ff3f40a0a043bc1d
BLAKE2b-256 48ea402429ea743ee0e4ca6e65323f0b8d9d1e752d8182107dc401e31e6ffef0

See more details on using hashes here.

Release history Release notifications | RSS feed

0.6.1

2 files

0.6.0

2 files

0.5.1

2 files

This release

0.5.0 This release

2 files

0.4.2

2 files

0.4.0

2 files

0.3.0

6 files

0.2.1

2 files

0.2.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page