Add binary decoding and correct axis name for plot, fix plot per layers#59
Merged
CeliaBenquet merged 5 commits intoDec 11, 2025
Merged
Conversation
…Decoder supports cloning
This was referenced Jul 24, 2025
CeliaBenquet
requested changes
Jul 24, 2025
Member
There was a problem hiding this comment.
nice! thanks @anandawolz, overall, some formating and comments to clarify + the labels_is_binary tag to remove as discussed, to be replaced with dict in the metrics directly.
anandawolz
commented
Jul 28, 2025
…ast layer & tests fix
Member
|
@anandawolz can you resolve the last comments and confirm that the requirements.txt works in all containers now? then I will merge, thank you! |
Author
|
Hi @CeliaBenquet, I’ve rerun the full pipeline on the hippocampus dataset and everything passes. |
Member
|
@anandawolz can you resolve the review comments as well :) |
Author
|
@CeliaBenquet, done resolving the review comments |
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.
Updates after @CeliaBenquet comments on this PR #59:
1. decoding() signature: changed to return a DecodeResult namedtuple (overall_score, per_label_error, per_label_score, label_types) instead of a raw 3‑tuple
2. Compute method storage: Updated Decoding.compute() to collect and store full DecodeResult objects for each layer, rather than unpacking into separate lists. Callers now work with a consistent, typed return value.
3. DecodingPlot:
Comment: The custom title specified by the user is still not applied when calling plot_metric. I haven’t investigated this issue yet.
4. Test updates:
5. Requirements: Please don't merge it: works in one container, breaks in another.
!! I still have to standardize the DecodeResult when the decoding function for dataset_label == visual or == HPC is called. For now their respective functions: decoding_frames& decoding_pos_dir are still returning tuples.
Original PR comments:
This PR refactors and extends the decoding and plotting utilities to properly handle both regression and classification (binary/multiclass) targets in neural decoding analysis, as well as adds options to the plotting interface for binary outcomes. It also makes sure that the test passes.
Details:
Readability. Replace manual k-loop and 8/9-split with a single GridSearchCV for better readability, runs a bit slower now
Test suite fixes.