diff --git a/README.md b/README.md index 125efea..bc9e035 100644 --- a/README.md +++ b/README.md @@ -1,54 +1,62 @@ ## Decoding the Neural Signatures of Valence and Arousal From Portable EEG Headset +This repository contains code for the research article, _Decoding the Neural Signatures of Valence and Arousal From Portable EEG Headset_ which can be found [here](https://www.frontiersin.org/articles/10.3389/fnhum.2022.1051463/abstract). ### Abstract -This paper focuses on classifying emotions on the valence-arousal plane using various -feature extraction, feature selection and machine learning techniques. Emotion -classification using EEG data and machine learning techniques has been on the rise in -the recent past. We evaluate different feature extraction techniques, feature selection -techniques and propose the optimal set of features and electrodes for emotion -recognition. The images from the OASIS image dataset were used for eliciting the -valence and arousal emotions, and the EEG data was recorded using the Emotiv Epoc -X mobile EEG headset. The analysis is additionally carried out on publicly available -datasets: DEAP and DREAMER. We propose a novel feature ranking technique and -incremental learning approach to analyze the dependence of performance on the number -of participants. Leave-one-subject-out cross-validation was carried out to identify -subject bias in emotion elicitation patterns. The importance of different electrode -locations was calculated, which could be used for designing a headset for emotion -recognition. Our study achieved root mean square errors (RMSE) of less than 0.75 on -DREAMER, 1.76 on DEAP, and 2.39 on our dataset. +Emotion classification using electroencephalography (EEG) data and machine learning techniques have been on the rise in the recent past. However, past studies use data from medical-grade EEG setups with long set-up times and environment constraints. This paper focuses on classifying emotions on the valence-arousal plane using various feature extraction, feature selection and machine learning techniques. +We evaluate different feature extraction and selection techniques and propose the optimal set of features and electrodes for emotion recognition. The images from the OASIS image dataset were used to elicit valence and arousal emotions, and the EEG data was recorded using the Emotiv Epoc X mobile EEG headset. The analysis is carried out on publicly available datasets: DEAP and DREAMER for benchmarking. We propose a novel feature ranking technique and incremental learning approach to analyze performance dependence on the number of participants. Leave-one-subject-out cross-validation was carried out to identify subject bias in emotion elicitation patterns. The importance of different electrode locations was calculated, which could be used for designing a headset for emotion recognition. The collected dataset and pipeline are also published. Our study achieved a root mean square score (RMSE) of 0.905 on DREAMER, 1.902 on DEAP, and 2.728 on our dataset for valence label and a score of 0.749 on DREAMER, 1.769 on DEAP and 2.3 on our proposed dataset for arousal label. -## Made With +## Dependencies * Python 3 * EEGExtract.py * Scikit-learn -* RAPIDS cuML * Numpy * Pandas * Matplotlib +* Dit +* Librosa +* Pyinform +* Scipy +* Seaborn +* Statsmodels -## Usage +## Folder Structure -Please make sure the following files are present before executing the code for this project: - -1. ImportUtils.py -2. EEGExtract.py -3. Preprocess.py -4. utils.py -5. EpochedFeatures.py -6. feature_extraction_25gb_ram -7. feature_extraction_25GB_RAM_DASM_RASM.py -8. feature_select_main.py -9. incremental_learning_deap.py -10. incremental_learning_dreamer.py -11. incremental_learning_oasis.py -12. incremental_learning_final_plots.py -13. run_scripts_incremental_learning.py -14. TopNByFSMethods.py -15. TopNByClassifier.py -16. 8.5_cross_validate.py -17. args_eeg.py +```bash +│ feature_extraction_25gb_ram.py +│ feature_extraction_25GB_RAM_DASM_RASM.py +│ README.md +│ requirements.txt +│ +├───cross_validation +│ 8_5_cross_validate.py +│ V2_cross_validate.py +│ +├───eeg_ml_pipeline +│ args_eeg.py +│ EEGExtract.py +│ EpochedFeatures.py +│ feature_select_main.py +│ frontiers_revision.ipynb +│ ImportUtils.py +│ intersection.pkl +│ TopNByFSMethods.py +│ utils.py +│ +├───incremental_learning +│ incremental_learning_deap.py +│ incremental_learning_dreamer.py +│ incremental_learning_oasis.py +│ incremetal_learning_final_plots.py +│ preprocess.py +│ run_scripts_incremental_learning.py +│ V2_deap_il.py +│ V2_dreamer_il.py +│ +└───ml_plots + draw_plots.ipynb +``` Note: For loading dataset, load_dataset.ipynb was used to load EEG data from headset recordings to NumPy array. diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..3390227 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,10 @@ +dit==1.5 +librosa==0.9.2 +matplotlib==3.4.3 +numpy==1.21.0 +pandas==1.3.2 +pyinform==0.2.0 +scikit_learn==1.1.3 +scipy==1.7.1 +seaborn==0.11.2 +statsmodels==0.13.5