# MOABB 代码仓库与 API 文档

> AI 辅助翻译，非官方版本。专业判断、引用和争议应以原文及其勘误为准。

- 来源 ID：S0145
- 原始来源：https://raw.githubusercontent.com/NeuroTechX/moabb/8391a6e1eda9de5c12961d8872f5eda9f0f59a1f/README.md
- 许可：BSD-3-Clause
- 翻译方法：Independent manual review; SHA-256-pinned source and translation
- 审校状态：独立人工审校完成

## 原始文件映射

- [README.md](../original/README.md)

## 许可文件（保留原文）

- [github-license-api.json](../license/github-license-api.json)：法律或许可证据原文未翻译
- [LICENSE](../license/LICENSE)：法律或许可证据原文未翻译

## 原始文件：README.md

<div align="center" class="moabb-readme-header">
  <img
    src="https://raw.githubusercontent.com/NeuroTechX/moabb/refs/heads/develop/docs/source/_static/moabb_notext.svg"
    width="220"
    height="220"
    alt="MOABB 标志"
  />
  <h1>BCI 基准大全（MOABB）</h1>
  <p>
    为常用脑机接口（BCI）算法建立综合基准，并在大量可免费获取的 EEG 数据集上进行评测。
  </p>
  <p>
    <a href="https://moabb.neurotechx.com/">文档</a> · <a href="https://moabb.neurotechx.com/docs/install/install.html">安装</a> · <a href="https://moabb.neurotechx.com/docs/auto_examples/index.html">示例</a> · <a href="https://moabb.neurotechx.com/docs/paper_results.html">基准结果</a> · <a href="https://moabb.neurotechx.com/docs/dataset_summary.html">数据集</a>
  </p>
  <p>
    <a href="https://doi.org/10.5281/zenodo.10034223"><img src="https://zenodo.org/badge/DOI/10.5281/zenodo.10034223.svg" alt="DOI"></a>
    <a href="https://github.com/NeuroTechX/moabb/actions/workflows/test.yml?query=branch%3Adevelop"><img src="https://github.com/NeuroTechX/moabb/actions/workflows/test.yml/badge.svg?branch=develop" alt="构建状态"></a>
    <a href="https://pypi.org/project/moabb/"><img src="https://img.shields.io/pypi/v/moabb?color=blue&style=flat-square" alt="PyPI"></a>
    <a href="https://pypi.org/project/moabb/"><img src="https://img.shields.io/pypi/v/moabb?label=version&color=orange&style=flat-square" alt="版本"></a>
    <a href="https://pypi.org/project/moabb/"><img src="https://img.shields.io/pypi/pyversions/moabb?style=flat-square" alt="Python 版本"></a>
    <a href="https://pepy.tech/project/moabb"><img src="https://pepy.tech/badge/moabb" alt="下载量"></a>
    <a href="https://github.com/NeuroTechX/moabb/actions/workflows/link-check.yml"><img src="https://github.com/NeuroTechX/moabb/actions/workflows/link-check.yml/badge.svg" alt="链接检查"></a>
  </p>
</div>

## 快速开始


```shell
pip install moabb
```

```python
import moabb
from moabb.datasets import BNCI2014_001
from moabb.evaluations import CrossSessionEvaluation
from moabb.paradigms import LeftRightImagery
from moabb.pipelines.features import LogVariance

from sklearn.discriminant_analysis import LinearDiscriminantAnalysis as LDA
from sklearn.pipeline import make_pipeline

moabb.set_log_level("info")

pipelines = {"LogVar+LDA": make_pipeline(LogVariance(), LDA())}

dataset = BNCI2014_001()
dataset.subject_list = dataset.subject_list[:2]

paradigm = LeftRightImagery(fmin=8, fmax=35)
evaluation = CrossSessionEvaluation(paradigm=paradigm, datasets=[dataset])
results = evaluation.process(pipelines)

print(results.head())
```

完整的安装选项和故障排除方法请参阅[文档](https://moabb.neurotechx.com/docs/install/install.html)。


## 免责声明

**这是一个开放科学项目，可能随社区需求而演进。**

## 问题

[脑机接口](https://en.wikipedia.org/wiki/Brain%E2%80%93computer_interface)让人能够通过脑信号与
计算机交互。本项目主要关注[脑电图](https://en.wikipedia.org/wiki/Electroencephalography)（EEG）
信号。这是一个非常活跃、汇集全球科研贡献的领域，但仍存在以下问题：

- BCI 的可复现研究还有很长的路要走。
- 许多 BCI 数据集虽可免费获取，研究人员却未公开代码；为了评测新算法而复现结果，往往比
  应有的难度更高。
- 预处理步骤的参数、所用工具箱和实现中的“技巧”都可能显著影响性能，而文献几乎从不报告
  这些细节。

因此，目前没有覆盖全面的 BCI 算法基准。新入门者不得不花费大量时间查阅文献，判断哪种
算法在什么数据集上表现最好。

## 解决方案

BCI 基准大全能够：

- 在大量可免费获取的 EEG 数据集上，为常用 BCI 算法建立综合基准。
- 在 GitHub 上公开代码，为未来的算法开发提供参考。
- 在网站上对算法进行排名和展示，清楚呈现该领域现有的不同方案。

当我们能在摘要中读到“所提方法在 MOABB（BCI 基准大全）上获得 89% 的分数，比当前最佳
方法高 5%……”时，这个项目便实现了目标。

## 核心团队

本项目隶属于 [NeuroTechX][link_neurotechx]，这是面向神经技术爱好者的国际社区。

BCI 基准大全由 [Alexander Barachant](http://alexandre.barachant.org/) 和
[Vinay Jayaram][link_vinay] 创立。

目前的维护者包括：

* [Sylvain Chevallier](https://sylvchev.github.io/)
* [Bruno Aristimunha](https://bruaristimunha.github.io/)
* [Pierre Guetschel](https://github.com/PierreGtch)
* [Grégoire Cattan](https://github.com/gcattan)
* [Anton Andreev](https://github.com/toncho11)

## 贡献者

MOABB 是一个社区项目，我们始终感谢所有贡献者！

<div align="center" class="moabb-contributors">
  <a href="https://github.com/NeuroTechX/moabb/graphs/contributors">
    <img src="https://contrib.rocks/image?repo=NeuroTechX/moabb" alt="MOABB 贡献者" width="1100" />
  </a>
</div>

## 致谢

MOABB 得到了以下组织的支持：

<a href="https://www.dataia.eu/en"><img src="https://www.dataia.eu/themes/dataia/css/images/DATAIA-h-sansfond.png" alt="DATAIA" style="height:60px; background-color:#2e4a7d; padding:10px; border-radius:5px;"/></a>

### 我们需要什么？

**需要你！** 无论以何种方式提供帮助都可以。

我们需要编程、用户体验、软件可持续性、文档与技术写作，以及项目管理方面的专长。

也欢迎你在项目推进过程中提供反馈。

我们的首要目标是在大量可免费获取的 EEG 数据集上，为常用 BCI 算法建立综合基准；同时，
我们也乐于支持每一位贡献者的职业发展。无论你希望学习编程、尝试协作工作，还是把现有技能
拓展到数字领域，我们都会提供帮助。

## 引用 MOABB

如果在实验中使用 MOABB，请引用 MOABB 及相关出版物：

[完整引用指南](https://moabb.neurotechx.com/docs/cite.html)

### 软件引用

#### APA 格式

```text
Aristimunha, B., Carrara, I., Guetschel, P., Sedlar, S., Rodrigues, P., Sosulski, J.,
Narayanan, D., Bjareholt, E., Barthelemy, Q., Schirrmeister, R. T., Kobler, R.,
Kalunga, E., Darmet, L., Gregoire, C., Abdul Hussain, A., Gatti, R., Goncharenko, V.,
Andreev, A., Thielen, J., Hajhassani, D., Begany, K., Moreau, T., Roy, Y., Jayaram, V.,
Barachant, A., & Chevallier, S. (2026). Mother of all BCI Benchmarks (MOABB) (Version 1.5.0).
Zenodo. https://doi.org/10.5281/zenodo.10034223
```

#### BibTeX 格式

```bibtex
@misc{Aristimunha_Mother_of_all,
  author       = {Aristimunha, Bruno and
                  Carrara, Igor and
                  Guetschel, Pierre and
                  Sedlar, Sara and
                  Rodrigues, Pedro and
                  Sosulski, Jan and
                  Narayanan, Divyesh and
                  Bjareholt, Erik and
                  Barthelemy, Quentin and
                  Schirrmeister, Robin Tibor and
                  Kobler, Reinmar and
                  Kalunga, Emmanuel and
                  Darmet, Ludovic and
                  Gregoire, Cattan and
                  Abdul Hussain, Ali and
                  Gatti, Ramiro and
                  Goncharenko, Vladislav and
                  Andreev, Anton and
                  Thielen, Jordy and
                  Hajhassani, Davoud and
                  Begany, Katelyn and
                  Moreau, Thomas and
                  Roy, Yannick and
                  Jayaram, Vinay and
                  Barachant, Alexandre and
                  Chevallier, Sylvain},
  title        = {Mother of all BCI Benchmarks},
  year         = 2026,
  publisher    = {Zenodo},
  version      = {1.5.0},
  url          = {https://github.com/NeuroTechX/moabb},
  doi          = {10.5281/zenodo.10034223},
}
```

### 科学出版物

如需引用 MOABB 的科学贡献，请使用以下论文：

#### MOABB 基准论文

> Sylvain Chevallier, Igor Carrara, Bruno Aristimunha, Pierre Guetschel, Sara Sedlar,
> Bruna Junqueira Lopes, Sébastien Velut, Salim Khazem, Thomas Moreau
>
> **["The largest EEG-based BCI reproducibility study for open science: the MOABB benchmark"](https://cnrs.hal.science/hal-04537061/)**
>
> HAL: hal-04537061

#### MOABB 原始论文

> Vinay Jayaram and Alexandre Barachant
>
> **["MOABB: trustworthy algorithm benchmarking for BCIs"](https://doi.org/10.1088/1741-2552/aadea0)**
>
> Journal of Neural Engineering 15.6 (2018): 066011
>
> [DOI: 10.1088/1741-2552/aadea0](https://doi.org/10.1088/1741-2552/aadea0)

---

**如果使用 MOABB 发表了论文，请[创建议题](https://github.com/NeuroTechX/moabb/issues)告知我们！**
我们很希望了解你的工作，并协助推广。

## 联系我们

如果要报告问题或建议改进，请在此 GitHub 仓库中[创建议题](https://github.com/NeuroTechX/moabb/issues)，
以便我们及时处理。


[link_alex_b]: http://alexandre.barachant.org/
[link_vinay]: https://www.linkedin.com/in/vinay-jayaram-8635aa25
[link_neurotechx]: http://neurotechx.com/
[link_sylvain]: https://sylvchev.github.io/
[link_bruno]: https://www.linkedin.com/in/bruaristimunha/
[link_igor]: https://www.linkedin.com/in/carraraig/
[link_pierre]: https://www.linkedin.com/in/pierreguetschel/
[link_neurotechx_signup]: https://neurotechx.com/
[link_gitter]: https://app.gitter.im/#/room/#moabb_dev_community:gitter.im
[link_moabb_docs]: https://moabb.neurotechx.com/
[link_arxiv]: https://arxiv.org/abs/1805.06427
[link_jne]: https://doi.org/10.1088/1741-2552/aadea0

## 原文 DOI 与数字核对索引

下列不变量从原始载荷自动提取，仅用于核对译文完整性，不构成额外证据摘要。

- `10.1088`
- `10.1088/1741-2552/aadea0`
- `10.5281`
- `10.5281/zenodo.10034223`
- `10.5281/zenodo.10034223.svg`
- `001`
- `014`
- `04537061`
- `066011`
- `1`
- `1.5.0`
- `10034223`
- `1100`
- `15.6`
- `1741`
- `1805.06427`
- `2`
- `2018`
- `2026`
- `220`
- `2552`
- `35`
- `5`
- `5%`
- `6`
- `8`
- `80%`
- `863`
- `89%`
- `9`
