pygsp2

Graph Signal Processing 2 in Python

https://github.com/gsp-eeg/pygsp2

Science Score: 49.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org, zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.8%) to scientific vocabulary
Last synced: 6 months ago · JSON representation

Repository

Graph Signal Processing 2 in Python

Basic Info
Statistics
  • Stars: 7
  • Watchers: 0
  • Forks: 1
  • Open Issues: 15
  • Releases: 10
Created over 1 year ago · Last pushed 9 months ago
Metadata Files
Readme Changelog Contributing License Zenodo

README.rst

=========================================
PyGSP2: Graph Signal Processing in Python
=========================================

The PyGSP2 is a Python package to ease
`Signal Processing on Graphs `_.
The documentation is available on
`Read the Docs `_
and development takes place on
`GitHub `_.
A (mostly unmaintained) `Matlab version `_ exists.

+-----------------------------------------------------+
||doc| |pypi| |conda| |pyversions| |license| |zenodo| |
+-----------------------------------------------------+
||release| |testing| |ruff| |yapf| |codespell| |isort||
+-----------------------------------------------------+

.. |doc| image:: https://readthedocs.org/projects/pygsp2/badge/?version=latest
   :target: https://pygsp2.readthedocs.io
.. |pypi| image:: https://img.shields.io/pypi/v/pygsp2.svg
   :target: https://pypi.org/project/PyGSP2
.. |conda| image:: https://img.shields.io/conda/v/conda-forge/pygsp2?label=conda-forge
   :target: https://anaconda.org/conda-forge/pygsp2
   :alt: Conda Version
.. |zenodo| image:: https://zenodo.org/badge/816842099.svg
   :target: https://zenodo.org/doi/10.5281/zenodo.13122920
.. |license| image:: https://img.shields.io/pypi/l/pygsp2.svg
   :target: https://github.com/gsp-eeg/pygsp2/blob/master/LICENSE.txt
.. |pyversions| image:: https://img.shields.io/pypi/pyversions/pygsp2.svg
   :target: https://pypi.org/project/PyGSP2
.. |release| image:: https://img.shields.io/github/actions/workflow/status/gsp-eeg/PyGSP2/release-pypi.yml?label=release
   :target: https://github.com/gsp-eeg/PyGSP2/actions
.. |testing| image:: https://img.shields.io/github/actions/workflow/status/gsp-eeg/PyGSP2/test-main.yml?label=testing
   :target: https://github.com/gsp-eeg/PyGSP2/actions
   :alt: GitHub Actions Workflow Testing Status
.. |ruff| image:: https://img.shields.io/github/actions/workflow/status/gsp-eeg/PyGSP2/ruff.yml?label=ruff
   :target: https://github.com/gsp-eeg/PyGSP2/actions
   :alt: GitHub Actions Workflow Ruff Status
.. |yapf| image:: https://img.shields.io/github/actions/workflow/status/gsp-eeg/PyGSP2/yapf.yml?label=yapf
   :target: https://github.com/gsp-eeg/PyGSP2/actions
   :alt: GitHub Actions Workflow Yapf Status
.. |codespell| image:: https://img.shields.io/github/actions/workflow/status/gsp-eeg/PyGSP2/codespell.yml?label=codespell
   :target: https://github.com/gsp-eeg/PyGSP2/actions
   :alt: GitHub Actions Workflow Codespell Status
.. |isort| image:: https://img.shields.io/github/actions/workflow/status/gsp-eeg/PyGSP2/isort.yml?label=isort
   :target: https://github.com/gsp-eeg/PyGSP2/actions
   :alt: GitHub Actions Workflow Isort Status

The PyGSP2 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.

While NetworkX_ and graph-tool_ are tools to analyze the topology of graphs,
the aim of the PyGSP2 is to analyze graph signals, also known as features or
properties (i.e., not the graph itself).
Those three tools are complementary and work well together with the provided
import / export facility.

.. _NetworkX: https://networkx.org
.. _graph-tool: https://graph-tool.skewed.de

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

>>> from pygsp2 import graphs, filters
>>> G = graphs.Logo()
>>> G.compute_fourier_basis()  # Fourier to plot the eigenvalues.
>>> # G.estimate_lmax() is otherwise sufficient.
>>> g = filters.Heat(G, scale=50)
>>> fig, ax = g.plot()

.. image:: ../pygsp2/data/readme_example_filter.png
    :alt:

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)
>>> fig, ax = G.plot(s, highlight=DELTAS)

.. image:: ../pygsp2/data/readme_example_graph.png
    :alt:

You can
`try it online `_,
look at the
`tutorials `_
to learn how to use it, or look at the
`reference guide `_
for an exhaustive documentation of the API. Enjoy!

Installation
------------

The PyGSP2 is available on PyPI::

    $ pip install pygsp2

The PyGSP2 is available on Conda Forge::

    $ conda install conda-forge::pygsp2

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

It is released under the terms of the BSD 3-Clause license.

If you are using the library for your research, for the sake of
reproducibility, please cite the version you used as indexed by
`Zenodo `_.
Or cite the generic concept as::

    @misc{pygsp,
      title = {PyGSP: Graph Signal Processing in Python},
      author = {Defferrard, Micha\"el and Martin, Lionel and Pena, Rodrigo and Perraudin, Nathana\"el},
      doi = {10.5281/zenodo.1003157},
      url = {https://github.com/epfl-lts2/pygsp/},
    }

Owner

  • Name: gsp
  • Login: gsp-eeg
  • Kind: organization
  • Email: alejandro.weinstein@gmail.com

GitHub Events

Total
  • Issues event: 8
  • Watch event: 4
  • Delete event: 2
  • Issue comment event: 9
  • Push event: 6
  • Pull request review event: 1
  • Pull request event: 10
  • Create event: 6
Last Year
  • Issues event: 8
  • Watch event: 4
  • Delete event: 2
  • Issue comment event: 9
  • Push event: 6
  • Pull request review event: 1
  • Pull request event: 10
  • Create event: 6

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 118 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 14
  • Total maintainers: 4
pypi.org: pygsp2

Package for EEG Graph signal Processing

  • Versions: 14
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 118 Last month
Rankings
Dependent packages count: 10.8%
Average: 35.7%
Dependent repos count: 60.6%
Last synced: 7 months ago

Dependencies

setup.py pypi
  • numpy *
  • scipy *
.github/workflows/release-pypi.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/codespell.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/isort.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/ruff.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/test-main.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/yapf.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
doc/requirements.txt pypi
  • memory_profiler *
  • numpydoc *
  • sphinx *
  • sphinx-copybutton *
  • sphinx-gallery *
  • sphinx-rtd-theme *
  • sphinxcontrib-bibtex *
pyproject.toml pypi
  • geopy *
  • matplotlib *
  • networkx *
  • numpy *
  • pandas *
  • pyxlsb *
  • scipy *
  • unidecode *
  • utm *