Repository navigation
Pin down z-scale normalized to integer (!) failure by separating the tests - #1971
Merged
Merged
Conversation
Contributor
Author
|
OK, I pined down an example of failure. from spikeinterface.preprocessing import normalize_by_quantile, scale, center, zscore
from spikeinterface.core import generate_recording
seed = 1
rec = generate_recording(seed=seed, mode="lazy")
rec_int = scale(rec, dtype="int16", gain=100)
zscore_recording = zscore(rec_int, dtype="int16", int_scale=256, mode="mean+std", seed=seed)
traces = zscore_recording.get_traces(segment_index=0)
trace_mean = np.mean(traces, axis=0)
trace_std = np.std(traces, axis=0)
assert np.all(np.abs(trace_mean) < 1)
assert np.all(np.abs(trace_std - 256) < 1)I am confused about this: |
Contributor
Author
|
OK, restoring this to legacy. I think this fails because of a mathematical program / lack of continuity correction. I opened a bug for this #1972 We should merge this so we can work on other stuff without getting bothered by the CI: |
samuelgarcia
reviewed
Sep 7, 2023
| stds = np.std(random_data, axis=0) | ||
| stds = stds[None, :] | ||
| gain = 1 / stds | ||
| gain = 1.0 / stds |
Member
|
|
Member
|
OK for me. |
Contributor
Author
In my simulations the std is fine, is the mean estimate that has a lot of variability. |
alejoe91
approved these changes
Sep 11, 2023
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I have this tests failing in #1970 which I have seen failing before. It is not failing in my computer so I want to separate it in its own test to hopefully isolate the failure.