-
Notifications
You must be signed in to change notification settings - Fork 191
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
Regularize whitening #2744
Merged
Merged
Regularize whitening #2744
Changes from 39 commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
9bda991
WIP
yger dc52a09
WIP
yger 4edbfcb
Merge branch 'SpikeInterface:main' into regularize_whitening
yger 62c6f82
Merge branch 'main' of github.com:spikeinterface/spikeinterface into …
yger ae7835c
Merge branch 'main' of github.com:spikeinterface/spikeinterface into …
yger 8028ef8
Merge branch 'SpikeInterface:main' into regularize_whitening
yger e726cdd
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] e627fee
Merge branch 'SpikeInterface:main' into regularize_whitening
yger 54c5723
Merge branch 'main' into regularize_whitening
yger 627f280
Not centering the whitening
yger 62bc321
typo
yger 23d221d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] d66882e
typo
yger a3474d0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] a329a80
WIP
yger 5b664b6
Merge branch 'main' of github.com:spikeinterface/spikeinterface into …
yger 842aaca
Merge branch 'SpikeInterface:main' into regularize_whitening
yger d693d13
Merge branch 'SpikeInterface:main' into regularize_whitening
yger d83d0c1
Adding tests and documentation, support for parallelism while whitening
yger b2e28f7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 3b8eabc
WIP
yger 853886c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5ccd5dd
Merge branch 'main' of github.com:yger/spikeinterface into regularize…
yger 83d2087
Merge branch 'SpikeInterface:main' into regularize_whitening
yger 6e6e033
Merge branch 'SpikeInterface:main' into regularize_whitening
yger a0b96e8
Merge branch 'main' into regularize_whitening
yger 8231a0c
Update src/spikeinterface/preprocessing/whiten.py
yger 8c1bddc
Update src/spikeinterface/preprocessing/whiten.py
yger 39ad18b
Update src/spikeinterface/preprocessing/whiten.py
yger 13e0634
Update src/spikeinterface/preprocessing/whiten.py
yger 35b2299
Fixes for regularization
yger 68dcaa5
Fixes
yger 81fa6bb
Merge branch 'main' into regularize_whitening
yger 787a89c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 343d5d2
WIP
yger 4de2bdc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] b4b76e7
WIP
yger ed61efd
WIP
yger 34615cd
Merge branch 'SpikeInterface:main' into regularize_whitening
yger d8706ba
Merge branch 'main' into regularize_whitening
yger dbbe2ff
Merge branch 'SpikeInterface:main' into regularize_whitening
yger be7683f
Merge branch 'main' into regularize_whitening
yger bad4152
Merge branch 'SpikeInterface:main' into regularize_whitening
yger a837d5a
Merge branch 'main' of github.com:spikeinterface/spikeinterface into …
yger 3d90bba
refine tests on whiten
samuelgarcia 88af862
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,14 @@ def test_whiten(create_cache_folder): | |
assert rec4.get_dtype() == "int16" | ||
assert rec4._kwargs["M"] is None | ||
|
||
# test regularization | ||
with pytest.raises(AssertionError): | ||
W, M = compute_whitening_matrix( | ||
rec, "local", random_chunk_kwargs, apply_mean=False, radius_um=None, regularize=True | ||
) | ||
# W must be sparse | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. which W are you testing here ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm just computing W with the default regularization method |
||
np.sum(W == 0) == 6 | ||
|
||
|
||
if __name__ == "__main__": | ||
test_whiten() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not see in the code wich assert is raised for this.
We should have better error than assert in this no ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've used what was already done, open to suggestions