Repository navigation
ENH use a metadata-aware cv_class directly as the top-level splitter (#1104) - #1262
Merged
bruAristimunha merged 2 commits intoOct 14, 2026
Merged
bruAristimunha merged 2 commits into
bruAristimunha merged 2 commits into
Conversation
…euroTechX#1104) A cv_class that declares metadata_columns and implements split(self, y, metadata) is no longer wrapped as the inner groups-CV: - CrossSubjectEvaluation builds it with cv_kwargs and routes it through the existing top-level splitter path (fold validation, split metadata, train/calibration/test support). - CrossSubjectSplitter and CrossSessionSplitter call its split(y, metadata) and get_n_splits(metadata) directly. The splitter owns the whole fold, so rows can be left out of both train and test (e.g. test one target subject on one session and drop its other sessions). Ordinary scikit-learn CVs, and LearningCurveSplitter (which has metadata_columns but split(X, y, groups)), keep the inner-CV path.
…ter extra columns; end-to-end test with the NeuroTechX#1104 splitter
bruAristimunha
force-pushed
the
fix/metadata-splitter-1104
branch
from
October 14, 2026 14:15
a10a1ba to
7896ef0
Compare
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.
ENH use a metadata-aware cv_class directly as the top-level splitter (#1104)
A cv_class that declares metadata_columns and implements
split(self, y, metadata) is no longer wrapped as the inner groups-CV:
the existing top-level splitter path (fold validation, split metadata,
train/calibration/test support).
and get_n_splits(metadata) directly.
The splitter owns the whole fold, so rows can be left out of both train
and test (e.g. test one target subject on one session and drop its other
sessions). Ordinary scikit-learn CVs, and LearningCurveSplitter (which has
metadata_columns but split(X, y, groups)), keep the inner-CV path.
Closes #1104