# EEG Motor Imagery Classificaiton

**URL:** <https://mne.discourse.group/t/eeg-motor-imagery-classificaiton/8279>\
**Category:** Support & Discussions\
**Created:** [February 5, 2024, 5:28pm UTC](https://mne.discourse.group/t/eeg-motor-imagery-classificaiton/8279 "2024-02-05T17:28:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SoroushZrZ](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/soroushzrz/32/3429_2.png) [@SoroushZrZ](https://mne.discourse.group/u/SoroushZrZ)\
**Post date:** [February 5, 2024, 5:28pm UTC](https://mne.discourse.group/t/eeg-motor-imagery-classificaiton/8279/1 "2024-02-05T17:28:46Z")

</div>

Hi all,

I have a big question regarding training deep-learning models for Motor Imagery classification.

1. For training and validation, should concatenate all the data from all the individuals? I meant, for example, for the Competition IV 2a dataset, there are 9 subjects. Should we concatenate all the data and then train our network or just choose one of the participants and train over the data just from that participant?
2. For the accuracy in most of the literature, is it the training accuracy or validation, which I think it would be validation, and if so, how would they define it because it varies epoch by epoch and sometimes won’t reach a threshold, so is it the average overall epoch or the last 100 epochs for training deep learning?

Thanks in advance,  
Best

---

<div class="post-metadata">

**Author:** ![SoroushZrZ](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/soroushzrz/32/3429_2.png) [@SoroushZrZ](https://mne.discourse.group/u/SoroushZrZ)\
**Post date:** [February 13, 2024, 1:51am UTC](https://mne.discourse.group/t/eeg-motor-imagery-classificaiton/8279/2 "2024-02-13T01:51:45Z")

</div>

Does anyone have any ideas about this point?

---

<div class="post-metadata">

**Author:** ![ivopascal](https://avatars.discourse-cdn.com/v4/letter/i/278dde/32.png) [@ivopascal](https://mne.discourse.group/u/ivopascal)\
**Post date:** [February 13, 2024, 10:04am UTC](https://mne.discourse.group/t/eeg-motor-imagery-classificaiton/8279/3 "2024-02-13T10:04:25Z")

</div>

Hi,

1. It depends on what you want to achieve. The task for the competition was originally to train a model on Subject X, Session 1 and then test it on Subject X, Session 2. This means you train 9 models, each model is trained and tested on the same subject. You can also choose to make it harder for yourself and train on subjects 1-8 and test on 9 to see if you can make an “out of the box” model. For this you can do leave-one-subject-out cross validation. I recommend following the design from the competition though.

2. In general literature should (and probably does) report validation accuracies. In this case that would the accuracy on session 2 for each subject. You can look at the average over 9 subjects, but it’s also good to look at the individual accuracies. You’ll find it works much better for some than for others.

---

<div class="post-metadata">

**Author:** ![SoroushZrZ](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/soroushzrz/32/3429_2.png) [@SoroushZrZ](https://mne.discourse.group/u/SoroushZrZ)\
**Post date:** [February 13, 2024, 10:25pm UTC](https://mne.discourse.group/t/eeg-motor-imagery-classificaiton/8279/4 "2024-02-13T22:25:48Z")

</div>

@ivopascal  
Thank you so much for your comprehensive response. I have checked the evaluation for all 9 subjects, but all the labels for all the participants are just 7, which corresponds to the left action. Am I right?
