Graph Wavelet Encoder
Graph wavelet scattering transform encoder for PyTorch Geometric. Computes multi-scale wavelet features from graph structure and node signals using lazy random-walk diffusion.
Installation
pip install graph-wavelet-encoder
For development (editable install):
pip install -e .
With dev dependencies (pytest, etc.):
pip install -e ".[dev]"
Usage
import torch
from torch_geometric.data import Data, Batch
from graph_wavelet_encoder import GraphWaveletEncoder
# Single graph or batched PyG Data
# Expects: .x (node features), .edge_index, .batch (for batched graphs)
encoder = GraphWaveletEncoder(
scales=(1, 2, 4, 8, 16),
sigma=2.0,
device=torch.device("cuda" if torch.cuda.is_available() else "cpu"),
)
features = encoder.encode(graph) # [batch_size, num_nodes, num_features_per_node]
The encoder uses a lazy random-walk matrix and produces zeroth-, first-, and second-order scattering coefficients. See the docstrings in graph_wavelet_encoder.encoder for details.
Development
- Package layout: src layout — package lives under
src/graph_wavelet_encoder/.
Testing and benchmarking
pytest tests/test_encoder.py -v -s
License
Yale Licence
Metadata
Release files for graph-wavelet-encoder 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| graph_wavelet_encoder-0.1.0.tar.gz | 16.4 kB | Without provenance | Details for graph_wavelet_encoder-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| graph_wavelet_encoder-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for graph_wavelet_encoder-0.1.0-py3-none-any.whl |
Total release size: 29.6 kB
Release files / graph_wavelet_encoder-0.1.0.tar.gz
| Download URL | graph_wavelet_encoder-0.1.0.tar.gz |
|---|---|
| Size | 16.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2375c32fdccf564494e5b640477bb99f3c75d9b6095fd261c53bd476c76d6897
|
|
BLAKE2b-256 checksum How to use checksums |
ef561c36b19d06538b7fb85f192dbedd5ddfc4729bcf68b5ab04f8056752435b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.13
|
Release files / graph_wavelet_encoder-0.1.0-py3-none-any.whl
| Download URL | graph_wavelet_encoder-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
43a165f7cacbe42cf81e073d652e9321fc4316ae3339d19fc68ddfd6283e7330
|
|
BLAKE2b-256 checksum How to use checksums |
5276f2bf6750e7aec0e516087cdfb814f15ba38e5322ba9f6aa81575a7b276fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.13
|
Security for graph-wavelet-encoder 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.