Metadata-Version: 2.4
Name: rosoku
Version: 0.0.3
Summary: A flexible callback-based toolkit for EEG/BCI experiments that lets you define data loading and preprocessing freely, while rosoku handles training, evaluation, and result logging for conventional and deep-learning models.
Author: Simon Kojima
License: BSD 3-Clause License
        
        Copyright (c) 2025, Simon Kojima
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: pandas
Requires-Dist: mne
Requires-Dist: pyriemann
Requires-Dist: scikit-learn
Requires-Dist: torch
Requires-Dist: msgpack
Dynamic: license-file

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

**rosoku** is a *callback-based experiment pipeline* for EEG/BCI research.  
You are free to design **how your data is loaded, processed, and shaped**,  
while rosoku handles **training, evaluation, logging, and result export**.

> **You control the data.  
> rosoku handles everything after.**

Working directly with PyTorch or scikit-learn provides flexibility but requires heavy boilerplate.  
Meanwhile, frameworks like MOABB or Braindecode are convenient, but restrict custom processing.

**rosoku fills the space between them — flexibility without overhead.**

---

## 🔥 Key Idea

| Task                               | rosoku handles                    | You define                        |
|------------------------------------|-----------------------------------|-----------------------------------|
| Dataset loading                    | receives via callback             | how to load (MNE, NumPy, custom)  |
| Preprocessing / feature extraction | pluggable via callbacks           | any processing you write          |
| Training loop                      | model fitting, scheduling, saving | sklearn estimator / PyTorch model |
| Evaluation & logging               | accuracy / saliency               | optional W&B configuration        |
| Result export                      | DataFrame / parquet / msgpack     | downstream analysis or plotting   |

---

## 🔧 Two Complementary Pipelines

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

Both follow the same concept:
You write data & preprocessing.
Rosoku handles training & evaluation.

---

## 🚀 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`
