Skip to content

rnagar-ux/MATH516-Epilepsy-ML-Project

Repository files navigation

EEG-Based Epileptic Seizure Detection Using Machine Learning

This project demonstrates the use of supervised machine learning models to classify EEG-derived features for detecting epilepsy. Using a balanced dataset from 198 subjects, the study evaluates Logistic Regression, Random Forest, and Support Vector Machine (SVM) classifiers to assess diagnostic performance.


Project Files

  • epilepsy_detection_final.ipynb — Main Jupyter notebook with code and analysis
  • Epileptic_featured_data.csv — Dataset with 40 extracted EEG features per subject
  • plots/ — Contains confusion matrices, feature importance, and AUC comparison charts

Models & Results

Model Accuracy AUC
Logistic Regression 1.00 1.00
Random Forest 1.00 1.00
Support Vector Machine 1.00 1.00
Reduced RF (Top 10) 1.00 1.00

All models achieved perfect classification performance. Feature importance analysis revealed that only 10 features are sufficient for maintaining accuracy, improving interpretability and speed.


Visualizations

Plots include:

  • Confusion matrices for each model
  • AUC comparison bar chart
  • Top 10 EEG feature importances

⚙️ How to Run

  1. Clone or download this repository
  2. Open epilepsy_detection_final.ipynb in Jupyter Notebook or JupyterLab
  3. Run all cells

Required Libraries

  • pandas
  • numpy
  • scikit-learn
  • matplotlib
  • seaborn

Dataset Info

  • Source: Public EEG dataset (Kaggle)
  • 198 subjects (99 with epilepsy, 99 without)
  • 40 EEG features extracted from time- and frequency-domain transformations
  • Label: stat (1 = epilepsy, 0 = non-epilepsy)

Author

Ritu Nagar
MSc Health Data Science and Statistics
University of Plymouth


License

This project is for educational and research purposes only.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages