Repository navigation
Add minimal integer-only PurgedEpochKFold for raw epoch windows - #1329
Conversation
Add opt-in chronological within-recording splitter with half-open raw-window purging, integer-only sample coordinates, fail-closed folds and focused tests. No automatic preprocessing/evaluation integration or leakage-free IIR claim. Signed-off-by: lindicaphxag-tech <24061721@hdu.edu.cn>
db8209e to
f56a00e
Compare
…oadcasting Signed-off-by: lindicaphxag-tech <24061721@hdu.edu.cn>
Signed-off-by: lindicaphxag-tech <24061721@hdu.edu.cn>
|
Focused follow-up on the current 3-file implementation: I found and fixed a concrete grouping edge case that matters for the intended The branch remains mergeable and |
…ile 404s The same dead profile appears twice in upstream's changelog and fails Lychee on this PR. Link to the project author-filtered PR history instead. Signed-off-by: lindicaphxag-tech <24061721@hdu.edu.cn>
|
CI blocker addressed on current head The previous exact code head completed the full MOABB OS/Python Test matrix, Docs, Braindecode integration, What's New and pre-commit successfully. Because this new commit edits the changelog, GitHub reran the checks; the new-head Test/Docs/Braindecode/What's New runs are still pending/running, so I am not claiming final all-green yet. The PR remains three files and mergeable. Once the current rerun finishes, maintainer review of this deliberately scoped opt-in primitive is the remaining substantive acceptance step. Thanks for the earlier specific scope guidance on #1235. |
|
Exact-head CI exception identified (run #40216319047, Braindecode integration): the job progressed through roughly 87% of its test suite and then emitted I attempted GitHub Actions' |
Distinct NaN objects hash differently, so treating missing recording IDs as legitimate grouping keys silently changes fold membership and purge scope. Reject top-level and tuple-component NaN IDs consistently before encoding. Signed-off-by: lindicaphxag-tech <24061721@hdu.edu.cn>
…is rejected Cover singleton NaN, separately allocated NaNs, tuple component NaN, and None rather than accepting or partitioning missing recording identities. Signed-off-by: lindicaphxag-tech <24061721@hdu.edu.cn>
|
Thanks @lindicaphxag-tech, this is the scope I asked for in #1235. I pushed one commit to your branch: a |
Why this smaller PR
This is the minimal opt-in follow-up requested by @bruAristimunha in #1235 for the raw-epoch-overlap concern in #280. The original large PR #1235 has now been closed as superseded. This PR deliberately contains only three files: one standalone splitter, focused tests, and the changelog.
Behavior and exact contract
PurgedEpochKFoldinmoabb/evaluations/splitters.py. Each recording is partitioned into near-equal contiguous chronological test blocks; training epochs are purged only when their half-open integer raw epoch intervals intersect the held-out windows.groupsis an explicitly supplied(n_epochs, 3)array of(recording_id, event_sample, epoch_n_samples); run identities can be hashable(subject, session, run)tuples. They are encoded as scalar group IDs to prevent NumPy tuple-broadcast comparison errors. Missing IDs (NoneorNaN, including within tuple IDs), invalid sample types, and int64 overflow fail closed.BaseParadigm, evaluation classes, automatic metadata injection, preprocessing, default splitters, API exports, or upstream CI files. No dynamic-programming class balancing or float-coordinate handling.Scientific boundary (deliberate)
This only prevents direct overlap of declared raw epoch extraction windows. It does not prove independence after continuous-recording preprocessing (such as zero-phase IIR/FIR filtering), learned transforms, or fitted scalers. This is not a complete resolution of #280, and no EEG benchmark/AUC gain is claimed. Filter-aware research remains in a separate fork-only branch, outside this upstream PR.
Exact-head verification (2026-10-26 00:24 UTC)
Current head:
0ebd0f05c3e8538b2a50286b7ab2e70f6756e0b5. A maintainer merged the latestdevelopinto the branch; the PR diff still contains only the standalone splitter, focused tests, and changelog.fd999cd2head passed the full multi-OS/Python Test matrix: https://github.com/NeuroTechX/moabb/actions/runs/40218418101 . Do not treat that earlier result as current-head CI.https://github.com/qinxwewlinks indocs/source/whats_new.rst(HTTP 404). The maintainer explicitly restored those upstream-baseline links and requested any unrelated link fix separately; this PR does not change them.Remaining acceptance: the maintainer has confirmed the minimal scope is acceptable and intends to merge after required checks pass; the current Test matrix is still running. Link Check is a known baseline failure, not a regression introduced by this PR. The branch is mergeable without git conflicts. No separate CI or unrelated changelog fixes are proposed here.
Original design discussion: #1235 .