This project is designed to process EEG data and predict gait events. It makes use of machine learning techniques and various neural network architectures for the prediction process. The entire workflow of the project is bundled in a Jupyter notebook called EEG_gait_prediction_pipeline.ipynb
.
This is the main Jupyter notebook, which coordinates the overall workflow. It imports and utilizes the functions from various modules:
- preprocess_eeg_data.ipynb - Concatenates the epochs data for multiple subjects into a single file for training the models.
- Read_data.ipynb - Loads the preprocessed data from the first module and prepares it for model training.
- Feature_Extraction_Parallel/Feature_extraction_all_channels_Parallel.py - Extracts relevant features from the EEG signal to reduce the dimensionality of the data and capture more informative features.
- Training_Models2.ipynb - Trains different machine learning models such as Random Forest, Decision Trees, Linear Regression, Support Vector Machines (SVM), and Neural Networks using the preprocessed data and checks their accuracy.
- Extract_Window_Data.ipynb - Extracts the required windowed data for making predictions on raw data.
- Final_Predictions_on_raw_data.ipynb - Makes predictions on new raw data using the trained machine learning models. The predicted events and their times are saved to a CSV file.
- Python 3.7 or above
- Libraries: MNE, pandas, scikit-learn, numpy, joblib, pickle, concurrent.futures
- Clone the repository.
- Ensure that you have the required Python version and all necessary libraries installed.
- Navigate to the project directory.
Run EEG_gait_prediction_pipeline.ipynb
in a Jupyter notebook.
The project has been run on four different datasets. The performance of the models was poorest for the scalp layer with only good channels, suggesting that the bad channels contained necessary information about motion artifacts, which enabled the models to accurately predict gait events. In contrast, the scalp layer with only good channels lacked this information, leading to suboptimal model performance.
The next steps in this project include reducing the epoch duration, extracting more relevant features, training the model on ICA data, hyperparameter tuning, and incorporating neural networks for prediction.
- Rushikesh Kankar
- ...
I would like to express my sincere gratitude to Dr. Helen Huang for her invaluable guidance and support throughout this project. Her expertise and insights have greatly enriched my work.
Please note that these results are preliminary and may change as the project progresses. For the most up-to-date results, please check back periodically.
This document is last updated on 10th May 2023.