Zero-phase SOS IIR 純輸入管線測試
Raw CSV → event buffer (-0.5~2.0 s) → 2 秒 reflection padding → 4th-order Butterworth SOS sosfiltfilt 1–40 Hz → 裁回原窗 → 500→200 Hz。
本次資料來源:EEG_Data_正常人。整條新管線未讀取 ASR/ICA cache,也未做 EA、artifact rejection、baseline correction 或預先 Z-score。
10subjects
2009left/right trials
8 × 500每筆純輸出
輸入與輸出約定
最小輸入只有連續 EEG (samples, 8)、同長度 marker vector 與 sampling rate。交換檔只保存濾波後微伏值 windows、labels、event_samples、metadata_json。前 100 點是 baseline,後 400 點是 task;normalization 留在模型 adapter 執行。
zero-phase 的 online 定義:它必須等事件後 2 秒資料收齊,再對完整 2.5 秒 buffer 做雙向濾波,因此是 buffered near-online,不是 sample-by-sample 即時濾波。此處依要求不提供 causal 分支。
濾波器響應

實際 C3 頻譜

實跑檢查
| Subject | Trials | Left | Right | Shape | Finite | Task |x| p95 median |
|---|---|---|---|---|---|---|
| sub1 | 203 | 100 | 103 | 203x8x500 | True | 20.3783 |
| sub2 | 203 | 102 | 101 | 203x8x500 | True | 26.1347 |
| sub3 | 200 | 100 | 100 | 200x8x500 | True | 32.5580 |
| sub9 | 201 | 100 | 101 | 201x8x500 | True | 46.9779 |
| sub10 | 200 | 100 | 100 | 200x8x500 | True | 24.1072 |
| sub11 | 200 | 100 | 100 | 200x8x500 | True | 46.6787 |
| sub12 | 201 | 100 | 101 | 201x8x500 | True | 42.1826 |
| sub13 | 200 | 100 | 100 | 200x8x500 | True | 171.8910 |
| sub14 | 200 | 100 | 100 | 200x8x500 | True | 35.5229 |
| sub15 | 201 | 100 | 101 | 201x8x500 | True | 32.0866 |
判斷
這個格式比既有訓練 cache 更適合部署:檔案內仍是可檢查的物理振幅,模型 normalization 沒被烘焙進資料。10 位 task |x| p95 中位數的跨受試者中位數為 34.04 µV;最高是 sub13 的 171.89 µV,明顯高於其餘受試者,但因本次指定不做 artifact rejection,資料照實保留,模型端可再使用 per-channel p95 scaling。
需要注意的是,test 資料夾目前只有上一版程式、結果 CSV 與 SSL backbone checkpoint,沒有新的 raw 測試 CSV,也沒有已微調的左右腳分類 checkpoint,因此本頁驗證的是 raw-to-model 資料管線,不把它包裝成外部分類準確率。