Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Refactor polynomial approximations and filtering in general #23

Draft
wants to merge 30 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
69aff82
motivation to represent approximated filters as proper filters
mdeff Mar 11, 2018
22e335e
move old implementation of approximate filtering
mdeff Mar 11, 2018
0ca71ba
Chebyshev approximation: sketch implementation
mdeff Mar 11, 2018
8b3e6a7
tests: only build the suites when running all tests
mdeff Mar 11, 2018
3e70aee
Chebyshev recursive evaluation
mdeff Mar 11, 2018
2c05734
Chebyshev direct evaluation
mdeff Mar 11, 2018
5e563a2
evaluate on n-dimensional arrays
mdeff Mar 11, 2018
9f576dd
first implementation of Chebyshev recursive filter
mdeff Mar 14, 2018
8e36852
Chebyshev: 3D signals and 2D coefficients
mdeff Mar 15, 2018
ccd590b
Chebyshev: Clenshaw evaluation
mdeff Mar 15, 2018
65346bf
catch unknown filter or evaluate method
mdeff Mar 16, 2018
6d45b02
scaling functions shall be callable from outside
mdeff Mar 16, 2018
cb6cbd1
Chebyshev: coefficients computation
mdeff Mar 18, 2018
d859915
Merge branch 'master' into polynomial-approximations
mdeff Apr 2, 2018
c9a277a
doc: examples of filter approximations
mdeff Apr 2, 2018
dd44dba
allow user to choose the tolerance when estimating lmax
mdeff Apr 3, 2018
cc9f508
localize and plot 2D (n to m features) filterbanks
mdeff Apr 3, 2018
5ca1ae0
normalize signal's shapes to #signal x #features x #nodes
mdeff Apr 3, 2018
ab8ff76
invalid syntax for python 2.7 and 3.4
mdeff Apr 3, 2018
f0b66a3
much faster graph construction (avoid constructing matrices)
mdeff Apr 3, 2018
717ceb5
bug: wrong error message when n_features_in=1 with invalid 3D signal …
mdeff Apr 10, 2018
21e37df
Merge branch 'polynomial-approximations' of https://github.com/epfl-l…
nperraud Jun 25, 2018
f93ab72
solve conflict of merging
nperraud Jul 5, 2018
9b4de7c
merge with master
nperraud Jul 5, 2018
ac7c5ec
add the repr back for filter
nperraud Jul 5, 2018
579994a
fix small bug if n_eigenvector is set
nperraud Jul 25, 2018
f016172
Merge branch 'fix-test-fourier' into polynomial-approximations
nperraud Jul 25, 2018
3d62043
Merge branch 'master' into polynomial-approximations
nperraud Dec 9, 2018
a12f5a4
fix new test system?
nperraud Dec 10, 2018
c086831
fix plots
nperraud Dec 10, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions doc/history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ History
0.6.0 (xxxx-xx-xx)
------------------

* Filters approximated by Chebyshev polynomials are now implemented as separate
filters, i.e. you need to do Chebyshev(Heat(tau=1), order=10).filter(signal) to
filter a signal with a heat kernel approximated by a Chebyshev polynomial of
order 10. The reasons are multiple:
- They are arguably different filters.
Try Heat().plot() and Chebyshev(Heat(), order=1).plot().
- It allows to visualize the approximated filters in the spectral domain, and
compare them with their continuous counterpart or other approximations.
- One can now instantiates filters which are solely defined by their Chebyshev
coefficients. That is the case when learning them with back-propagation in a
neural network setting, and it's useful to (i) visualize the learned filters
in the spectral and vertex domains, and (ii) to compute and visualize the
feature maps.
See the new tutorial on filter approximations for usage.
* print(graph) and print(filters) now show valuable information.
* Building a graph object is much faster.
* New rectangular filter (low-pass and band-pass).
Expand Down
11 changes: 9 additions & 2 deletions pygsp/filters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
Filter.synthesize
Filter.compute_frame
Filter.estimate_frame_bounds
Filter.approximate
Filter.plot
Filter.localize

Expand Down Expand Up @@ -85,6 +86,10 @@

**Chebyshev polynomials**

.. autosummary::

Chebyshev

.. autosummary::

compute_cheby_coeff
Expand Down Expand Up @@ -130,7 +135,9 @@
'lanczos_op'
]

__all__ = _FILTERS + _APPROXIMATIONS
__all__ = _FILTERS + _APPROXIMATIONS + ['Chebyshev']

_utils.import_classes(_FILTERS, 'filters', 'filters')
_utils.import_functions(_APPROXIMATIONS, 'filters.approximations', 'filters')
_utils.import_functions(_APPROXIMATIONS, 'filters.approximations_old', 'filters')

from .approximations import *
Loading