AI 中文总结
研究旨在解决EEGLAB管道MATLAB实现不利于Python和云工作流部署的问题,开发EEGPrep在Python中重现该管道,经测试其能高精度重现EEGLAB管道,可从PyPI安装或在Docker中运行。
AI 中文摘要
**目的**:自动脑电图预处理在研究和临床工作中很常见,但很少有管道经过系统测试。在最近的一项基准测试中,默认的EEGLAB管道是唯一显著优于简单高通滤波的管道。然而,其MATLAB实现使在Python和云工作流程中的部署变得复杂。我们开发了EEGPrep以在支持BIDS数据的同时在Python中重现此管道。主要技术问题是数值方面的:在递归滤波和独立成分分析(ICA)期间小的浮点差异会累积。**方法**:EEGPrep涵盖默认的EEGLAB工作流程:平均重新参考、使用clean rawdata插件去除伪迹、Picard ICA、ICLabel成分分类、通道插值和分时段。我们在主要分析的ARM arm64和补充分析的Intel x86 64上,将每个阶段与MATLAB参考输出进行比较。测试数据集包含来自13名参与者的64通道P300听觉oddball记录。我们测量了最大绝对差、均方根误差、ICA的AMARI距离以及ICLabel决策之间的一致性。**主要结果**:在ARM arm64上,对于所有12名分析的受试者,导入和重新参考完全匹配。clean rawdata和Picard ICA阶段的数值保持为零,最大均方根等于1.5×10^-12微伏,AMARI距离小于或等于0.000001,平均相关性等于1.000。ICLabel神经网络推理引入了唯一可测量的差异,最大均方根等于2.0×10^-5微伏。然而,每个受试者的拒绝决策是一致的,并且差异在插值和分时段过程中没有增加,端到端最大均方根小于或等于2.1×10^-5微伏。Intel x86 64分析的匹配精度相同。**意义**:EEGPrep重现了经过验证的EEGLAB管道,并且可以从PyPI安装或在Docker中运行。
英文摘要
Objective. Automated EEG preprocessing is common in research and clinical work, but few pipelines have been tested systematically. In a recent benchmark, the default EEGLAB pipeline was the only pipeline that significantly outperformed simple high pass filtering. Its MATLAB implementation, however, complicates deployment in Python and cloud workflows. We developed EEGPrep to reproduce this pipeline in Python while supporting BIDS data. The main technical problem was numerical: small floating point differences can accumulate during recursive filtering and ICA. Approach. EEGPrep covers the default EEGLAB workflow: average rereferencing, artifact removal with the clean rawdata plugin, Picard ICA, ICLabel component classification, channel interpolation, and epoching. We compared each stage with MATLAB reference output on ARM arm64, the primary analysis, and Intel x86 64, the supplementary analysis. The test dataset contained 64 channel P300 auditory oddball recordings from 13 participants. We measured maximum absolute difference, RMS error, AMARI distance for ICA, and agreement between ICLabel decisions. Main Results. On ARM arm64, import and rereferencing matched exactly for all 12 analysed subjects. The clean rawdata and Picard ICA stages remained at numerical zero, with maximum RMS equal to 1.5 x 10^-12 microvolts, AMARI distance less than or equal to 0.000001, and mean correlation equal to 1.000. ICLabel neural network inference introduced the only measurable difference, with maximum RMS equal to 2.0 x 10^-5 microvolts. Rejection decisions nevertheless agreed for every subject, and the difference did not increase through interpolation and epoching, with end to end maximum RMS less than or equal to 2.1 x 10^-5 microvolts. The Intel x86 64 analysis matched to the same precision. Significance. EEGPrep reproduces the validated EEGLAB pipeline and can be installed from PyPI or run in Docker.