This project aims to classify EEG (electroencephalogram) data into various brain activity categories, including seizure and non-seizure activities, using advanced machine learning models.
The primary objectives of this project are:
- To classify EEG signals into seizure and non-seizure categories (Binary Classification).
- To categorize EEG signals into five distinct classes (Multi-Class Classification):
- Eye-open
- Eye-closed
- Hippocampal region
- Epileptogenic region
- Seizure
- Project Objective
- Dataset
- Data Preprocessing
- Feature Extraction
- Classification Models
- Evaluation and Results
- Setup and Execution
- Technologies Used
- Contributions
- License
The Bonn EEG dataset is used for this project. The data comprises single-channel EEG recordings with 4097 features per record. Each EEG recording is classified into five distinct categories as mentioned above.
- Metadata Creation: Efficiently created metadata to manage EEG files.
- Label Encoding & Decoding:
- Label Encoder converts categorical labels into numerical indices for model compatibility.
- Label Decoder facilitates interpretability by converting predictions back to original categorical labels.
The project utilizes Recurrence Quantification Analysis (RQA) to:
- Extract recurrence and determinism features from the EEG signals.
- Analyze temporal data, providing insights into repetitive and predictable patterns.
- Generate a comprehensive feature set essential for effective classification.
Two primary classification tasks are performed:
- Task: Classify EEG signals as seizure or non-seizure.
- Approach: Simplified binary labels for seizure (0) and non-seizure (1).
- Task: Classify EEG signals into five activity types.
- Models Evaluated:
- Logistic Regression
- Random Forest
- Decision Tree
- XGBoost (Top performer)
- Cross-validation: 10-fold cross-validation applied to select the optimal model.
- High robustness and clear differentiation between seizure and non-seizure categories.
- Low false positives and negatives indicated by confusion matrix.
- Top Model: XGBoost with an F1 Score of approximately 74%.
- Class-wise performance highlights challenges, notably in capturing Classes 1 to 4 effectively.
- Overall accuracy: 26%, indicating a need for further model refinement.
- Clone the repository:
git clone <repository-url>
- Execute provided scripts or notebooks for preprocessing, feature extraction, model training, and evaluation.
- Python
- NumPy
- Pandas
- scikit-learn
- XGBoost
- Matplotlib (for visualizations)