-
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
Adjust eps for whitening in case of very small magnitude data #2070
Adjust eps for whitening in case of very small magnitude data #2070
Conversation
…/spikeinterface into adjust-eps-for-whitening
for more information, see https://pre-commit.ci
Co-authored-by: Alessio Buccino <[email protected]>
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.
@magland we discussed internally and we would like to expose epsilon and make a few changes. I cannot push to your branch. Can you allow me to do that?
Here's my working branch: https://github.com/alejoe91/spikeinterface/tree/adjust-eps-for-whitening
@alejoe91 I have invited you to my fork of spikeinterface. |
@alejoe91 It seems that the implementation does not quite agree with the doc string. It says
But then the code says if data.dtype.kind == "f" or eps is None: Notice the "or" IMO, the estimation of eps should only happen if eps is None.... AND ... the default should be None => effective default is 1e-8. That's somewhat different from what you have. If you do go the route of having default eps is None, which is what I am suggesting, then it needs to be updated throughout the codebase. |
@magland done! Thanks for the feedback! |
@alejoe91 looks good to me! |
Resolves #2064
I explain what is happening in the comments
I ran the following test:
And got the expected variances close to 1
And without the adjustment the second array is very wrong