Skip to main content

🕯️ Rosoku — A Flexible EEG/BCI Experiment Pipeline Toolkit

Rosoku is a research-oriented Python framework for running reproducible EEG/BCI experiments with both conventional machine-learning models and deep-learning models.

It bridges the gap between high-level EEG/BCI frameworks (such as MOABB and Braindecode) and low-level machine-learning libraries (such as scikit-learn and PyTorch), by providing structured yet flexible experiment pipelines without hiding critical details.

Rosoku emphasizes clarity, reproducibility, and experimental control over maximum automation or throughput.


🔥 Core Philosophy

Rosoku is designed around a simple idea:

You define what the data are and how they should be processed.
Rosoku defines how experiments are run, evaluated, and recorded.

Rather than enforcing a fixed dataset or model API, Rosoku relies on explicit, callback-driven interfaces that make each experimental choice visible and reproducible.

This makes Rosoku particularly suitable for:

  • method development
  • ablation studies
  • cross-subject / cross-session analysis
  • careful comparison of pipelines in research papers

🧠 What Rosoku Does (and What You Control)

Task Rosoku handles You define
Dataset orchestration train/valid/test grouping what an item means
Data loading unified pipeline how to load (MNE, NumPy, custom)
Preprocessing execution & split handling any signal processing you write
Training loop fitting, scheduling, checkpointing sklearn estimator / PyTorch model
Evaluation scoring, grouping, aggregation metrics, saliency, logging
Result export parquet / msgpack / pth downstream analysis or plotting

Rosoku does not:

  • impose a dataset format
  • hide training logic behind opaque abstractions
  • silently modify randomness or preprocessing behavior

🔧 Two Complementary Pipelines

API Purpose Typical models
conventional() classical ML classification MDM / TSClassifier / CSP / SVM / LDA
deeplearning() deep learning with PyTorch EEGNet / Braindecode / custom CNN/RNN

Both pipelines follow the same design:

  1. You define items describing which data belong to each split
  2. You provide callbacks to load and preprocess data
  3. Rosoku runs training, evaluation, and result aggregation

This shared structure makes it easy to compare classical and deep-learning approaches within the same experimental setup.


🧪 Reproducibility First

Rosoku is designed with reproducibility as a first-class concern:

  • deterministic training is supported via explicit seeding
  • data loading behavior is transparent
  • no implicit parallelism is used

For maximum reproducibility, Rosoku recommends running with

num_workers = 0

especially when publishing or debugging experiments.


🚀 Quick Start

Full runnable examples are available under examples/.

Recommended first files:

  • examples/example_within-subject-classification-riemannian.py
  • examples/example_within-subject-classification-deeplearning.py

These examples demonstrate:

  • item-based dataset definition
  • grouped test evaluation
  • conventional vs deep-learning pipelines
  • reproducible experiment execution

✨ Who Is Rosoku For?

Rosoku is not a black-box AutoML tool.

It is designed for researchers who:

  • want to understand and control every step of their pipeline
  • need transparent experiments for publications
  • work across multiple datasets, subjects, or sessions
  • value explicitness over convenience

If you prefer maximum automation, MOABB or Braindecode may be a better fit.
If you want a clear, inspectable bridge between theory and implementation, Rosoku is built for you.

Release files for rosoku 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rosoku 0.0.7
File Size Uploaded
rosoku-0.0.7.tar.gz 34.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rosoku 0.0.7
File Interpreter ABI Platform
rosoku-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 71.7 kB

Release files / rosoku-0.0.7.tar.gz

Download URL rosoku-0.0.7.tar.gz
Size 34.5 kB
Tags Source
SHA-256 checksum
How to use checksums
bd3690eb5c0d9e59f67f1dae1398dbf243df05b139d4539f187166e9f0c90d5d
BLAKE2b-256 checksum
How to use checksums
57e52c1d37d79dd34dea076d470c6d9adb908825042eab66def44027bfc7a4c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release files / rosoku-0.0.7-py3-none-any.whl

Download URL rosoku-0.0.7-py3-none-any.whl
Size 37.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b69601fbbd76d28041a7a53ec288569097ff5346f74cbc8ade8496cdab0242c9
BLAKE2b-256 checksum
How to use checksums
c809103e0f2c601d2f56ba7e08d1a9745b7bbb2ce27ae40d7a6f44ed72732fc7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page