Skip to content

Commit c299f9a

Browse files
committed
milestone A: add benchmark and notebook scaffolding
1 parent db23c8f commit c299f9a

71 files changed

Lines changed: 9262 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,16 @@ htmlcov/
3939
/figures/
4040
/outputs/
4141
/scratch/
42+
/results/
43+
44+
# Benchmark artifacts
45+
benchmarks/reports/generated/
46+
47+
# Notebook and generated example artifacts
48+
notebooks/.ipynb_checkpoints/
49+
**/.ipynb_checkpoints/
50+
examples/output/
51+
52+
# Local logs
53+
*.log
54+
tests/jdss_log.txt

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,22 @@ pytest
154154
pytest --cov=mne_denoise --cov-report=html
155155
```
156156

157+
## Benchmarking and notebook structure
158+
159+
The repository now includes scaffolding for reproducible benchmarking and
160+
dataset tutorial notebooks:
161+
162+
- `benchmarks/` contains config-driven benchmarking modules.
163+
- `benchmarks/configs/` contains dataset, method, metric, and experiment YAMLs.
164+
- `notebooks/` contains tutorial tracks split by dataset and step.
165+
- `scripts/benchmark/run_benchmark.ps1` runs a benchmark experiment config.
166+
167+
Example entrypoint:
168+
169+
```powershell
170+
python -m benchmarks.runners.run_experiment --config benchmarks/configs/experiments/pilot_milestone_a.yaml
171+
```
172+
157173
## Contributing
158174

159175
We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

benchmarks/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Benchmark Suite
2+
3+
This folder contains the reproducible benchmarking framework for `mne-denoise`.
4+
5+
## Scope
6+
7+
- Dataset-specific loading and preprocessing wrappers.
8+
- Method registry including baselines and `mne-denoise` methods.
9+
- Standard metric computation for denoising quality and preservation.
10+
- Experiment runners that produce machine-readable outputs.
11+
12+
## Conventions
13+
14+
- Config-first runs: all experiments are defined in YAML under `benchmarks/configs/`.
15+
- Determinism: all methods should accept a `random_state`.
16+
- Outputs: write per-run artifacts to `results/` (ignored by git).
17+
18+
## Next steps
19+
20+
- Implement loaders in `benchmarks/datasets/registry.py`.
21+
- Implement method wrappers in `benchmarks/methods/registry.py`.
22+
- Implement metrics in `benchmarks/metrics/core.py`.
23+
- Wire runner entrypoint in `benchmarks/runners/run_experiment.py`.

benchmarks/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Benchmarking utilities for mne-denoise."""

benchmarks/configs/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Benchmark Configs
2+
3+
Config groups:
4+
5+
- `datasets/`: dataset roots, modalities, and split policies.
6+
- `methods/`: parameter grids and default method settings.
7+
- `metrics/`: enabled metrics and thresholds.
8+
- `experiments/`: explicit combinations of dataset x methods x metrics.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: ds003620_runabout_mobi
2+
modality: eeg_mobile
3+
description: OpenNeuro Runabout MoBI dataset for nonstationary line and motion noise.
4+
dataset_root: data/raw/openneuro/ds003620
5+
fetch:
6+
enabled: false
7+
source: openneuro
8+
dataset: ds003620
9+
splits:
10+
type: subject
11+
subjects: []
12+
preprocessing:
13+
l_freq: 1.0
14+
h_freq: 120.0
15+
resample_sfreq: 250.0
16+
metadata:
17+
task: oddball
18+
primary_use_case: zapline_plus_stress_test
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: eegdenoisenet
2+
modality: eeg
3+
description: Artifact-focused benchmark for EOG/EMG denoising performance.
4+
dataset_root: data/raw/eegdenoisenet
5+
fetch:
6+
enabled: false
7+
source: gin_or_github
8+
splits:
9+
type: predefined
10+
subjects: []
11+
preprocessing:
12+
l_freq: 1.0
13+
h_freq: 100.0
14+
resample_sfreq: 256.0
15+
metadata:
16+
task: artifact_removal
17+
primary_use_case: eog_emg_benchmark
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: mne_sample
2+
modality: meg_eeg
3+
description: MNE sample dataset for ERP/ERF preservation and baseline comparisons.
4+
dataset_root: data/raw/mne_sample
5+
fetch:
6+
enabled: true
7+
source: mne.datasets.sample
8+
splits:
9+
type: subject_session
10+
subjects: [sample]
11+
preprocessing:
12+
l_freq: 1.0
13+
h_freq: 100.0
14+
resample_sfreq: 250.0
15+
metadata:
16+
task: auditory_visual
17+
primary_use_case: evoked_preservation
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: ssvep_template
2+
modality: eeg_ssvep
3+
description: Template for SSVEP benchmark datasets (MAMEM/Tsinghua/BETA).
4+
dataset_root: data/raw/ssvep
5+
fetch:
6+
enabled: false
7+
splits:
8+
type: subject
9+
subjects: []
10+
preprocessing:
11+
l_freq: 2.0
12+
h_freq: 90.0
13+
resample_sfreq: 250.0
14+
metadata:
15+
task: ssvep
16+
primary_use_case: periodic_dss
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: pilot_milestone_a
2+
seed: 42
3+
output_root: results/benchmarks/pilot_milestone_a
4+
datasets:
5+
- benchmarks/configs/datasets/mne_sample.yaml
6+
- benchmarks/configs/datasets/ds003620_runabout_mobi.yaml
7+
methods:
8+
- benchmarks/configs/methods/baselines.yaml
9+
- benchmarks/configs/methods/mne_denoise.yaml
10+
metrics:
11+
- benchmarks/configs/metrics/primary.yaml
12+
runtime:
13+
max_subjects_per_dataset: 2
14+
save_intermediate: true
15+
reporting:
16+
export_markdown_summary: true
17+
export_csv_metrics: true

0 commit comments

Comments
 (0)