Machine Learning for EEG in BCIs and Healthcare
Key Takeaways:
-
EEG → preprocessed → feature extraction → classifier → BCI output.
-
Applications of ML in BCIs:
- SSVEP-based spellers
- Motor imagery BCIs
- Neurological disorder detection
-
Importance: Careful preprocessing and feature selection are critical for accurate classification.
-
Emphasis on understanding SSVEP response characteristics and how ML can interpret them for BCIs.
Step-by-Step Workflow:
- Converts continuous EEG signals to discrete-time by sampling at defined intervals.
- Band-pass filtering (6–80 Hz) removes unwanted frequency components.
- Goal: reduce noise and retain relevant neural oscillations.
- EEG divided into short epochs (time windows) per trial.
- Allows computation of features for each epoch.
- Power Spectrum Density (PSD): energy at different frequencies (key for SSVEP).
- Time-domain features: amplitude, latency of ERP components.
- Frequency-domain features: band-power, dominant frequencies.
- ML models classify EEG epochs using extracted features.
- Example: Canonical Correlation Analysis (CCA) compares EEG with reference stimuli to identify the attended frequency.
- Other possible models: LDA, SVM, deep learning.
- Purpose: predict user intent or detect brain states.
- Compare predicted labels with ground truth.
- Metrics: classification accuracy, confusion matrices.
Focus: Analysis of pre-recorded SSVEP dataset, post-processing and ML classification.
- 12 SSVEP stimulus classes
- 8 EEG channels
- 15 trials per stimulus
- Band-pass filtering (6–80 Hz)
- Artifact removal (ICA or ASR)
- Epoch segmentation (4-second windows)
- Compute magnitude spectrum per epoch using FFT
- Inspect key channels (e.g., Oz) for stimulus frequency peaks
- Identify clear vs noisy SSVEP responses
-
CCA Workflow:
- Generate sine/cosine templates for each stimulus frequency and harmonics
- Compute correlation between EEG epochs and templates
- Assign stimulus label with highest correlation
-
Complete ML pipeline:
- Load EEG epochs
- Apply preprocessing & filtering
- Generate reference templates
- Apply CCA classification
- Evaluate accuracy per subject
-
Accuracy varied across subjects:
- Low (~26–30%)
- High (~91%)
-
Average accuracy: 60%
-
Highlights inter-subject variability and the importance of preprocessing.
- Focused on post-processing EEG data and ML-based classification for SSVEP BCIs.
- Hands-on experience covered the full pipeline: Filtering → Epoching → Feature Extraction → CCA Classification → Evaluation
- Emphasis on practical application using real pre-recorded datasets.
Outcome: By the end of the day, participants gained practical skills in SSVEP data analysis, feature extraction, ML classification, and evaluation of EEG-based BCIs,