A Brain-Computer Interface (BCI) system that decodes P300 EEG signals into text using both classical machine learning and deep learning (EEGNet).
This project enables communication for ALS patients by translating brain signals into five-letter Spanish words via a 6×6 P300 speller matrix.
- Dataset: BNCI Horizon 2020 — P300 Dataset (008-2014)
- Subjects: 8
- Sampling Rate: 250 Hz
- EEG Channels: Fz, Cz, P3, Pz, P4, PO7, PO8, Oz
- Output: Decoded 5-letter words
- Approaches:
- Classical Machine Learning (6 models)
- Deep Learning (EEGNet + Optuna tuning)
- Raw EEG Signals
- Preprocessing & Feature Extraction
- Classification (ML / EEGNet)
- Row-Column Decoding
- Word Reconstruction
| File | Description |
|---|---|
classical.py |
Classical ML pipeline with 6 classifiers |
eegnet_final.py |
EEGNet deep learning pipeline |
FINAL_RESULTS_COMPARISON |
Aggregated results |
requirements.txt |
Dependencies |
README.md |
Documentation |
- Linear Discriminant Analysis (LDA)
- Logistic Regression
- Support Vector Machine (RBF Kernel)
- Support Vector Machine (Linear Kernel)
- K-Nearest Neighbors (KNN)
- Gaussian Naive Bayes
EEGNet Architecture:
- Temporal Convolution → (F1 = 32, Kernel = 64)
- Depthwise Spatial Convolution → (D = 2)
- Separable Convolution → (F2 = 32)
- Fully Connected Layer
Training Features:
- Weighted Binary Cross-Entropy Loss
pos_weight × 1.5- F2-score based early stopping
- Optuna hyperparameter tuning
Install all dependencies:
pip install -r requirements.txt