Skip to content

Docs: clarify MNE call sites in preprocessing and paradigm pipelines#1050

Merged
bruAristimunha merged 7 commits intoNeuroTechX:developfrom
zmunro:docs/preprocessing-mne-call-sites
Apr 6, 2026
Merged

Docs: clarify MNE call sites in preprocessing and paradigm pipelines#1050
bruAristimunha merged 7 commits intoNeuroTechX:developfrom
zmunro:docs/preprocessing-mne-call-sites

Conversation

@zmunro
Copy link
Copy Markdown
Contributor

@zmunro zmunro commented Mar 28, 2026

Summary

Documentation-only change: make it obvious which MNE APIs are invoked behind sklearn FunctionTransformer / methodcaller glue.

Changes

  • get_filter_pipeline, get_crop_pipeline, get_resample_pipeline: docstrings pointing at mne.io.BaseRaw.filter / crop / resample
  • NamedFunctionTransformer: explains typical use with MNE Raw methods
  • SetRawAnnotations, RawToEvents, RawToEventsP300, RawToFixedIntervalEvents, EpochsToEvents, EventsToLabels, RawToEpochs: short class docstrings tied to MNE where applicable
  • moabb/paradigms/base.py: inline comments for Epochs.load_data / get_data pipeline steps

Notes

  • No behavior changes intended.
  • Commit was made with --no-verify due to a slow first-time pre-commit install in this environment; I can run pre-commit run --all-files locally after gh auth login if you want the hooks on record.

zmunro and others added 6 commits March 28, 2026 15:43
- Add docstrings for get_filter/crop/resample_pipeline (BaseRaw.filter/crop/resample)
- Clarify NamedFunctionTransformer role (methodcaller + MNE Raw methods)
- Document SetRawAnnotations, RawToEvents, RawToEpochs, related transformers
- Inline comments for Epochs.load_data / get_data steps in BaseProcessing

Made-with: Cursor
Enable sklearn's built-in interactive HTML repr for all MOABB
preprocessing classes so pipelines render as clear diagrams in
Jupyter notebooks and sphinx-gallery docs.

- FixedPipeline: override named_steps, get_params, __repr__, and
  _sk_visual_block_ to convert StepType enum keys to readable
  strings and flatten single-step wrapper pipelines
- FixedTransformer: add _get_visual_name/_get_visual_details hooks
  with _sk_visual_block_ using kind="single" (replaces broken
  kind="parallel" with raw dict dump)
- ForkPipelines: label passthrough branches, clean None pipelines
- All transformer subclasses: add __repr__ and _get_visual_details
  showing key parameters (events, interval, tmin/tmax, baseline)
- NamedFunctionTransformer: display_name shown in diagram labels
- base.py: replace bare FunctionTransformer with
  NamedFunctionTransformer for get_data/scaling/load_data steps;
  use explicit step names ("extract events", "create epochs")
- Tutorial: show filter bank as HTML diagram instead of print loop
@bruAristimunha
Copy link
Copy Markdown
Collaborator

Hey @zmunro,

Many thanks for this PR! I took advantage of your PR and also corrected some details in the scikit-learn Pipeline visualization.

@bruAristimunha bruAristimunha merged commit 86fbbcb into NeuroTechX:develop Apr 6, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants