Core Decoding Workflow#

Estimated reading time:4 minutes

The canonical EEG decoding pipeline in four lessons: preprocess and window, split without subject leakage, train a baseline against chance, then persist prepared data so you do not pay the windowing cost on every rerun. Difficulty 1-2; assumes the Start Here trio.

This category encodes the mistakes EEG decoding papers most often make – random window splits that leak subjects across train and test, baselines that beat chance only because of a confound, and re-windowing every session because nothing was cached. The leakage-safe split lesson is the rubric anchor for E3.27 invariants and tracks the evaluation guidance in Cisotto and Chicco (2024). Sourced from docs/tutorial_restructure_plan.md Category B (lines 380-410).

What you will learn:

  • How to compose preprocessing as a list of Braindecode preprocessors (filtering, resampling, channel selection, scaling) and apply it consistently across recordings.

  • How to cut continuous signal into fixed-length and event-locked windows.

  • Why subject-aware splitting is non-negotiable for generalisation claims, and how to implement one with EEGDash’s split helpers.

  • How to train a small baseline model against an explicit chance level and report a confidence interval.

  • How to persist windows or features to disk and reload them in a later session without redoing the pipeline.

Run the lessons in order:

  1. plot_10_preprocess_and_window.py – preprocessing pipeline and window construction.

  2. plot_11_leakage_safe_split.py – subject-aware train / val / test split.

  3. plot_12_train_a_baseline.py – a small model versus the chance level.

  4. plot_13_save_and_reuse_prepared_data.py – save once, reuse many.

How do I preprocess EEG and create model-ready windows?

How do I preprocess EEG and create model-ready windows?

How do I split EEG data without subject leakage?

How do I split EEG data without subject leakage?

How do I train a leakage-safe baseline classifier on EEG?

How do I train a leakage-safe baseline classifier on EEG?

How do I save and reload prepared windows + features?

How do I save and reload prepared windows + features?