Random Forest and SVM classifiers now usе a CPU
data
folder - store raw EEG data in .txt format
- Run
main_preparation.py
insideDataPreparation
folder, it creates file with processed raw data for classifier fitting - Run
RandomForest_main.py
insideRandomForest
folder, it fit classifier and save it insidemodels
folder
Classes: 0 = кнопка не нажата 1 = кнопка нажата левой 2 = кнопка нажата правой
CV_RandomForest.py
Parameters obtained using a cross-validation parameters grid search.
Mark's dataset (whole dataset was used)
3 folds for cross-validation were used and n_iter=20
Best Params: {"n_estimators": 2000, "min_samples_split": 2, "min_samples_leaf": 2, "max_features": "auto", "max_depth": 50, "bootstrap": false} Best Accuracy: 0.9799830842965886
Kate's dataset (data = data.loc[500:150000])
3 folds for cross-validation were used and n_iter=7
Best Params: {'n_estimators': 1000, 'min_samples_split': 10, 'min_samples_leaf': 1, 'max_features': 'sqrt', 'max_depth': 70, 'bootstrap': False} Best Accuracy: 0.9806521739130435
Plots are stored in Plots
folder
- Average precision score plot
- Extension of Precision-Recall curve to multi-class plot
Color - Class For Extension of Precision-Recall curve to multi-class plot
- Class 0 - Navy color
- Class 1 - Darkorange color
- Class 2 - Green color
- Average precision score line - Gold color
- Set
BASE_DIR
inconfig.py
- Check which model is imported (variable: model)
- Check data imported for prediction (variable: data)
- Check channels on which classes are predicted (variable: channels). To get
channels with highest variance - run
variance.py
insideChannel_selection
folder
-
KNn - have GPU implementation, but now the CPU is used.
TODO: implement GPU learning
-
CatBoost_Gradient - have GPU implementation.
TODO: implement grid-search for parameters tuning
-
XGBoost - have GPU implementation.
TODO: implement grid-search for parameters tuning
-
Frequency ranges for motor imagery registration: mu (8–12 Hz) and beta (13–28 Hz) [1]. Signal modulation is focused over sensorimotor cortex and in the alpha- and beta frequency bands associated with mu rhythm activity [2].
-
From the scalp EEG signals, it has also been found that imagination of movement leads to short-lasting and circumscribed attenuation (or accentuation) in mu (8–12 Hz) and beta (13–28 Hz) rhythmic activities, known as event-related desynchronization (or synchronization) (ERD/ERS) [1]. A person suppresses mu wave patterns when he or she performs a motor action or, with practice, when he or she visualizes performing a motor action [3].
P.S.: Mu waves are suppressed when mirror neurons fire. Mirror neurons play a role in mapping others' movements into the brain without actually physically performing the movements [3].
Sources:
[1] https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1989674/#R6
[2] https://www.bci2000.org/mediawiki/index.php/User_Tutorial:Introduction_to_the_Mu_Rhythm