Skip to content

EEG-based brain signal classification using classical machine learning with feature engineering and comparative model evaluation for BCI and NeuroAI research.

Notifications You must be signed in to change notification settings

alizangeneh/eeg-signal-classification-using-classical-ml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EEG-Based Brain Signal Classification using Classical Machine Learning

Overview This project presents a complete machine learning pipeline for classifying human brain states using real EEG bio-signal data. Several classical machine learning models are evaluated and compared based on their performance using standard scientific metrics.

The goal of this project is to demonstrate strong foundations in signal processing, feature engineering, machine learning, and model evaluation for research-oriented applications such as Brain–Computer Interfaces (BCI), NeuroAI, and Human–Machine Interaction.

Dataset This project uses the publicly available EEG Eye State Dataset from the UCI Machine Learning Repository.

The dataset contains EEG recordings from 14 channels with more than 14,000 samples, labeled as:

Eye Open

Eye Closed

Each row represents a time sample of EEG activity across multiple EEG channels.

Project Structure

eeg-signal-classification-using-classical-ml | |-- data | |-- eeg_eye_state.csv | |-- src | |-- preprocess.py | |-- feature_extraction.py | |-- train_models.py | |-- evaluate.py | |-- results | |-- roc_curves | |-- confusion_matrices | |-- requirements.txt |-- README.md

Preprocessing

Band-pass filtering (0.5–40 Hz) to remove EEG noise

Signal normalization using standard scaling

Train/test split with an 80/20 ratio

Feature Extraction From each EEG channel, the following features are extracted:

Mean

Variance

Root Mean Square (RMS)

Skewness

Kurtosis

Power Spectral Density (PSD)

Machine Learning Models The following classifiers are trained and evaluated:

Logistic Regression

Support Vector Machine (SVM)

Random Forest

XGBoost

k-Nearest Neighbors (kNN)

Hyperparameter tuning is performed using GridSearch with cross-validation.

Evaluation Metrics

Accuracy

Precision

Recall

F1-score

ROC Curve

AUC (Area Under Curve)

All models are evaluated using identical train/test splits for fair comparison.

Results After execution, numerical results are stored in: results/metrics_table.csv

Visual results including ROC curves and confusion matrices are saved in: results/roc_curves results/confusion_matrices

Future Work

Deep learning models using CNN and LSTM for raw EEG signal classification

Real-time EEG-based BCI system

Multi-class mental state classification

Integration with robotic control systems

Author Ali Zangeneh GitHub: https://github.com/alizangeneh

About

EEG-based brain signal classification using classical machine learning with feature engineering and comparative model evaluation for BCI and NeuroAI research.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages