Filters¶
The pygsp.filters
module implements methods used for filtering and
defines commonly used filters that can be applied to pygsp.graphs
. A
filter is associated to a graph and is defined with one or several functions.
We define by filter bank a list of filters, usually centered around different
frequencies, applied to a single graph.
Interface¶
The Filter
base class implements a common interface to all filters:
|
Evaluate the kernels at given frequencies. |
|
Filter signals (analysis or synthesis). |
|
Convenience alias to |
|
Convenience wrapper around |
|
Return the filter that makes the frame tight. |
|
Return the pseudo-inverse filter bank. |
|
Compute the associated frame. |
|
Estimate lower and upper frame bounds. |
|
Plot the spectral response of a filter bank. |
|
Localize the kernels at a node (to visualize them). |
Filters¶
Then, derived classes implement various common graph filters.
Filters that solve differential equations
The following filters solve partial differential equations (PDEs) on graphs, which model processes such as heat diffusion or wave propagation.
|
Design a filter bank of heat kernels. |
|
Design a filter bank of wave kernels. |
Low-pass filters
|
Design a filter bank of heat kernels. |
Band-pass filters
These filters can be configured to be low-pass, high-pass, or band-pass.
|
Design an exponential window filter. |
|
Design a rectangular filter. |
Filter banks of two filters: a low-pass and a high-pass
|
Design 2 filters with the regular construction (tight frame). |
|
Design 2 filters with the Held construction (tight frame). |
|
Design 2 filters with the Simoncelli construction (tight frame). |
|
Design 2 filters with the Papadakis construction (tight frame). |
Filter banks composed of dilated or translated filters
|
Design an A B cubic spline wavelet filter bank. |
|
Design an half cosine filter bank (tight frame). |
|
Design an itersine filter bank (tight frame). |
|
Design a filter bank of Mexican hat wavelets. |
|
Design a filter bank of Meyer wavelets (tight frame). |
|
Design a simple tight frame filter bank (tight frame). |
Filter banks for vertex-frequency analyzes
Those filter banks are composed of shifted versions of a mother filter, one per graph frequency (Laplacian eigenvalue). They can analyze frequency content locally, as a windowed graph Fourier transform.
|
Design a filter bank with a kernel centered at each frequency. |
|
Design a filter bank with a kernel centered at each frequency. |
Approximations¶
Moreover, two approximation methods are provided for fast filtering. The computational complexity of filtering with those approximations is linear with the number of edges. The complexity of the exact solution, which is to use the Fourier basis, is quadratic with the number of nodes (without taking into account the cost of the necessary eigendecomposition of the graph Laplacian).
Chebyshev polynomials
|
Compute Chebyshev coefficients for a Filterbank. |
|
To compute the m+1 coefficients of the polynomial approximation of an ideal band-pass between a and b, between a range of values defined by lambda_min and lambda_max. |
|
Chebyshev polynomial of graph Laplacian applied to vector. |
|
Fast filtering using Chebyshev polynomial for a perfect rectangle filter. |
Lanczos algorithm
|
TODO short description |
|
Perform the lanczos approximation of the signal s. |