spectralbrain.sgw_transform#
- spectralbrain.sgw_transform(L, scales, *, signal=None, kernel=<function mexican_hat_kernel>, chebyshev_order=30, lam_max=None)[source]#
Spectral Graph Wavelet Transform via Chebyshev approximation.
Computes T_g^{t_j} f = g(t_j · L) · f for each scale t_j, without eigendecomposition.
- Parameters:
L (SparseMatrix, shape (N, N)) – Laplacian (stiffness matrix).
scales (ndarray, shape (S,)) – Wavelet scales (positive reals).
signal (ndarray, shape (N,) or (N, d), optional) – Signal to transform. Default = identity (delta at each vertex) — gives the wavelet coefficient matrix.
kernel (callable) – Wavelet kernel g(x). Default: Mexican hat.
chebyshev_order (int) – Polynomial approximation order (higher = more accurate).
lam_max (float, optional) – Upper bound on eigenvalues of L.
None= estimate via power iteration.
- Returns:
ndarray, shape (S, N) or (S, N, d) – Wavelet coefficients at each scale.
- Return type:
References
Hammond DK, Vandergheynst P, Gribonval R. Wavelets on graphs via spectral graph theory. ACHA 30(2):129–150, 2011.