구축 방법 — Brain-Computer Interface · v1.0 · 2026-10-26
■ 방법
- 실제 BCI 실험 기록을 재생하며 classifier를 브라우저에서 바로 학습·평가하는 학습 주제. 탭 4개: P300 Speller / SSVEP / Motor Imagery / Information Transfer Rate. 사전 학습한 모델 없음
- P300 speller: 특징 = flash 뒤 0–0.8초, 6채널 × 0.05초 칸 16개 평균(96개). Shrinkage LDA(γ 0.1, 정한 값), leave-one-run-out(19 run 학습, 1 run 시험). Repetition마다 row·column score를 더해 가장 큰 row·column. 비교용: Pz 0.35–0.5초 평균만 쓰는 규칙
- SSVEP: 3–40 Hz band-pass 뒤 CCA, reference = 후보 주파수와 2배의 sin·cos. Window 앞 1–5초
- Motor Imagery/Execution: small Laplacian C3·C4, 특징 = cue 뒤 0.5–2.5초 log mu(8–13 Hz)·beta(13–30 Hz) power 4개, LDA(대각선 1e-6). Leave-one-out, 앞 N개로 학습하고 나머지 시험, cursor는 1초 sliding window를 0.25초마다. ERD/ERS = 0.25초 칸 mu power, cue 전 1.5초 대비 %
- ITR: Wolpaw 식 B = log₂N + P log₂P + (1−P) log₂((1−P)/(N−1)), bits/min = B × 60 ÷ T. T의 쉬는 시간(1초)은 정한 값
- 전처리: Python 3 · MNE 1.13.2 · NumPy 2.5.3 · SciPy 1.18.1 · wfdb. 파이썬 기준값은 브라우저와 같은 필터(python/jsfilt.py)를 씀. 실행 prepare 20261025T102831Z · measures 20261025T114536Z
- 화면 계산: 직접 쓴 JavaScript(eeg-core.js, bci-core.js), 외부 라이브러리 없음
- LLM 없음
■ 데이터
- 같은 데이터의 S001–S020 run 3·7·11(Motor Execution)·4·8·12(Motor Imagery), T1 왼주먹·T2 오른주먹, 피험자마다 42–45 trial → Motor Imagery 체험(S007·S001·S009를 화면에 실음)
- ERP-based Brain-Computer Interface recordings (erpbci) 1.0.0 (PhysioNet, Citi·Poli·Cinel) · ODC-By 1.0 · 참가자 s01, 20 run, BioSemi 64채널 2048 Hz → Fz·Cz·Pz·PO7·PO8·Oz, 귀 평균 reference, 0.5–20 Hz, 128 Hz
- MAMEM SSVEP Database (mssvepdb) 1.0.0 (PhysioNet, CERTH-ITI) · ODC-By 1.0 · dataset 3, Emotiv EPOC 14채널 128 Hz, 참가자 U001, 5초 window 125개 → O1·O2·F3·F4
- 모든 원본 파일을 PhysioNet SHA256SUMS로 대조함
- 브라우저용: 0.1 µV 단위 16비트 정수, base64(EEG 기초 R02·R01 각 1.67 MB, P300 1.05 MB, SSVEP 1.02 MB, Motor Imagery 1.35 MB). BCI 데이터는 BCI 탭을 열 때 받음
- 성격: 공개 실측 데이터. EEGMMIDB의 기록 reference 위치는 데이터 설명에 없음
- 사용자 입력 저장 없음
■ 검증
- P300(20 run, leave-one-run-out, 우연 2.8%) repetition 1/3/5/10번: LDA 45/80/90/100% · Pz만 5/10/10/15%
- SSVEP(125 window, 우연 20%) window 1/2/3/4/5초: O1·O2 44.0/67.2/76.0/87.2/90.4% · F3·F4 19.2/21.6/28.0/32.8/28.0%
- Motor Imagery(leave-one-out, 20명): 평균 59.2%, 범위 33.3–95.6% · Motor Execution 평균 57.6%. 화면: S007 MI 95.6%·ME 97.8%, S001 62.2%·62.2%, S009 33.3%·57.1%
- S007 ERD(MI, 0.5–2.5초): right fist C3 −36% · left fist C4 하락, 반대쪽 ERS
- ITR 식: 2개·100%·60초 = 1 bit/min, 우연 = 0, 36개·90%·10초 = 25.13 bits/min(파이썬과 같음)
- 학습·평가 분리: P300 leave-one-run-out, Motor Imagery leave-one-out과 앞/뒤 분할, SSVEP는 학습 없음
- signal.aileelab.com으로 옮긴 뒤 같은 검사(tests/eeg/core-test.mjs)를 다시 돌려 위 수치가 모두 그대로임을 확인(2026-10-26)
■ 범위
- EEG 기초·Metrics는 건강한 자원자 1명의 쉬는 기록 2분. 지표 값은 정상 기준이나 감정 판정이 아님. BCI 체험은 각 데이터의 참가자 1–3명이며 다른 사람·장비의 성능을 대신하지 않음
■ 출처
- Schalk, G. et al. (2004). BCI2000: A general-purpose brain-computer interface (BCI) system. IEEE Transactions on Biomedical Engineering 51(6).
- Citi, L., Poli, R., Cinel, C. (2010). Documenting, modelling and exploiting P300 amplitude changes due to variable target delays in Donchin's speller. Journal of Neural Engineering 7, 056006.
- Oikonomou, V.P. et al. (2016). Comparative evaluation of state-of-the-art algorithms for SSVEP-based BCIs. arXiv:1602.00904 (MAMEM SSVEP Database).
- Goldberger, A. et al. (2000). PhysioBank, PhysioToolkit, and PhysioNet. Circulation 101(23).
- Farwell, L.A., Donchin, E. (1988). Talking off the top of your head. Electroencephalography and Clinical Neurophysiology 70(6).
- Lin, Z. et al. (2006). Frequency recognition based on canonical correlation analysis for SSVEP-based BCIs. IEEE Transactions on Biomedical Engineering 53(12).
- Pfurtscheller, G., Lopes da Silva, F.H. (1999). Event-related EEG/MEG synchronization and desynchronization. Clinical Neurophysiology 110(11).
- Wolpaw, J.R. et al. (2002). Brain-computer interfaces for communication and control. Clinical Neurophysiology 113(6).
- 데이터: EEG Motor Movement/Imagery Dataset 1.0.0 · ODC-By 1.0 · https://physionet.org/content/eegmmidb/1.0.0/
- 데이터: erpbci 1.0.0 · ODC-By 1.0 · https://physionet.org/content/erpbci/1.0.0/
- 데이터: MAMEM SSVEP Database 1.0.0 · ODC-By 1.0 · https://physionet.org/content/mssvepdb/1.0.0/
- 도구: MNE-Python 1.13.2 · BSD-3 · wfdb · MIT (전처리 때만 사용)
How it's built — Brain-Computer Interface · v1.0 · 2026-10-26
■ Method
- A learning topic that replays real BCI recordings and trains and scores the classifiers in the browser. 4 tabs: P300 Speller / SSVEP / Motor Imagery / Information Transfer Rate. No pretrained model
- P300 speller: features = 0–0.8 s after each flash, 6 channels × 16 bins of 0.05 s (96 features). Shrinkage LDA (γ 0.1, set value), leave-one-run-out (train on 19 runs, test on 1). Scores are summed per row and column over repetitions; the largest row and column win. For comparison: a rule using only the Pz mean at 0.35–0.5 s
- SSVEP: 3–40 Hz band-pass, then CCA with sine and cosine references at each candidate frequency and its double. First 1–5 s of each window
- Motor Imagery/Execution: small-Laplacian C3 and C4; features = log mu (8–13 Hz) and beta (13–30 Hz) power 0.5–2.5 s after the cue (4 features); LDA (1e-6 on the diagonal). Leave-one-out, and train on the first N trials / test on the rest; the cursor uses a 1 s sliding window every 0.25 s. ERD/ERS = mu power in 0.25 s bins as % of the 1.5 s before the cue
- ITR: Wolpaw formula B = log₂N + P log₂P + (1−P) log₂((1−P)/(N−1)), bits/min = B × 60 ÷ T. The 1 s pause in T is a set value
- Preprocessing: Python 3 · MNE 1.13.2 · NumPy 2.5.3 · SciPy 1.18.1 · wfdb. Python references use the same filters as the browser (python/jsfilt.py). Runs: prepare 20261025T102831Z · measures 20261025T114536Z
- On-page computation: hand-written JavaScript (eeg-core.js, bci-core.js), no external libraries
- No LLM
■ Data
- Same dataset, S001–S020, runs 3, 7, 11 (Motor Execution) and 4, 8, 12 (Motor Imagery), T1 left fist and T2 right fist, 42–45 trials per person → Motor Imagery demo (S007, S001 and S009 shown)
- ERP-based Brain-Computer Interface recordings (erpbci) 1.0.0 (PhysioNet, Citi, Poli, Cinel) · ODC-By 1.0 · participant s01, 20 runs, BioSemi 64 channels at 2048 Hz → Fz, Cz, Pz, PO7, PO8, Oz, earlobe reference, 0.5–20 Hz, 128 Hz
- MAMEM SSVEP Database (mssvepdb) 1.0.0 (PhysioNet, CERTH-ITI) · ODC-By 1.0 · dataset 3, Emotiv EPOC 14 channels at 128 Hz, participant U001, 125 windows of 5 s → O1, O2, F3, F4
- Every source file was checked against PhysioNet's SHA256SUMS
- Browser format: 16-bit integers in 0.1 µV units, base64 (basics R02 and R01 1.67 MB each, P300 1.05 MB, SSVEP 1.02 MB, Motor Imagery 1.35 MB). BCI data loads when the BCI tab opens
- Nature: public measured data. The EEGMMIDB recording reference is not stated in the dataset description
- Nothing typed by visitors is saved
■ Validation
- P300 (20 runs, leave-one-run-out, chance 2.8%) at 1/3/5/10 repetitions: LDA 45/80/90/100% · Pz only 5/10/10/15%
- SSVEP (125 windows, chance 20%) at 1/2/3/4/5 s: O1·O2 44.0/67.2/76.0/87.2/90.4% · F3·F4 19.2/21.6/28.0/32.8/28.0%
- Motor Imagery (leave-one-out, 20 people): mean 59.2%, range 33.3–95.6% · Motor Execution mean 57.6%. Shown: S007 MI 95.6%, ME 97.8%; S001 62.2%, 62.2%; S009 33.3%, 57.1%
- S007 ERD (MI, 0.5–2.5 s): right fist C3 −36%, left fist C4 drop, ERS on the other side
- ITR formula: 2 choices, 100%, 60 s = 1 bit/min; chance = 0; 36 choices, 90%, 10 s = 25.13 bits/min (same as Python)
- Training/testing split: P300 leave-one-run-out; Motor Imagery leave-one-out and first/last split; SSVEP needs no training
- After the move to signal.aileelab.com the same checks (tests/eeg/core-test.mjs) were rerun and every number above was unchanged (2026-10-26)
■ Scope
- EEG basics and Metrics use two minutes of rest from one healthy volunteer; metric values are not norms or emotion judgments. The BCI demos use 1–3 participants per dataset and do not stand for other people or devices
■ Sources
- Schalk, G. et al. (2004). BCI2000: A general-purpose brain-computer interface (BCI) system. IEEE Transactions on Biomedical Engineering 51(6).
- Citi, L., Poli, R., Cinel, C. (2010). Documenting, modelling and exploiting P300 amplitude changes due to variable target delays in Donchin's speller. Journal of Neural Engineering 7, 056006.
- Oikonomou, V.P. et al. (2016). Comparative evaluation of state-of-the-art algorithms for SSVEP-based BCIs. arXiv:1602.00904 (MAMEM SSVEP Database).
- Goldberger, A. et al. (2000). PhysioBank, PhysioToolkit, and PhysioNet. Circulation 101(23).
- Farwell, L.A., Donchin, E. (1988). Talking off the top of your head. Electroencephalography and Clinical Neurophysiology 70(6).
- Lin, Z. et al. (2006). Frequency recognition based on canonical correlation analysis for SSVEP-based BCIs. IEEE Transactions on Biomedical Engineering 53(12).
- Pfurtscheller, G., Lopes da Silva, F.H. (1999). Event-related EEG/MEG synchronization and desynchronization. Clinical Neurophysiology 110(11).
- Wolpaw, J.R. et al. (2002). Brain-computer interfaces for communication and control. Clinical Neurophysiology 113(6).
- Data: EEG Motor Movement/Imagery Dataset 1.0.0 · ODC-By 1.0 · https://physionet.org/content/eegmmidb/1.0.0/
- Data: erpbci 1.0.0 · ODC-By 1.0 · https://physionet.org/content/erpbci/1.0.0/
- Data: MAMEM SSVEP Database 1.0.0 · ODC-By 1.0 · https://physionet.org/content/mssvepdb/1.0.0/
- Tools: MNE-Python 1.13.2 · BSD-3 · wfdb · MIT (preprocessing only)
■ History
- 2026-10-26 · v1.0 · Released