Motor Imagery - Incremental Learning

Come here to discuss about OpenViBE in general!
Post Reply
Sofia
Posts: 10
Joined: Tue Aug 17, 2021 9:10 am

Motor Imagery - Incremental Learning

Post by Sofia »

Hello!
Hope everything is well.

I have the following questions about incremental learning.

1. Is scenario "motor-imagery-bci-3-online-incremental" an implementation that just combines the two scenarios named as "motor-imagery-bci-2-classifier-trainer" and "motor-imagery-bci-3-online" in order to be able to run only one scenario (the incremental-online) instead of first running scenario 2 so that the classifier is trained and after running the online scenario? Or is its purpose something else?

I am asking this because I want to create a scenario to make the classifier learn more over its current knowledge. In other words, I don't want the classifier to be trained only with one .ov file. I need incremental learning.

I want to use the CSP spatial filter and this is what I've done so far: (please let me know if my understanding is wrong)
1. I created scenario "mi-csp-concatenate-multiple-files" in which I concatenate several .ov files using Signal Concatenation box and finally save the new file as "concatenated-file.ov".
2. In scenario "mi-csp-2-train-CSP" I gave as input the new concatenated-file.ov and trained the csp spatial filter.
3. In scenario "mi-csp-3-classifier-trainer" I also gave as input the new concatenated-file.ov and the csp-spatial-filter.cfg (from scenario 2) and trained the classifier.
4. In scenario "mi-csp-4-online" I use the "csp-spatial-filter.cfg" and "motor-imagery-bci-config-classifier.cfg" that were created from the training with the concatenated-file.ov.

The results I got, weren't better than the results I got from training with a single .ov file. I think this may be caused because 3 out of the 5 .ov files that I used in concatenation had bad accuracy. I also believe that this may not be the ideal solution to my problem because of two reasons:

Firstly, these 5 .ov files were from different subjects and secondly because I want the online scenario to be able to adjust to new knowledge - in other words, while the subject is trying to imagine a right/left hand movement, I want its tries to be used in the next guessing or in other words to be added to the training set so that the testing will probably get better results.

2. Do you have any ideas of how I can implement this?

I hope I explained well my idea.
I would appreciate your help and ideas.

Thank you in advance.

Thibaut
Posts: 264
Joined: Wed Oct 31, 2018 9:14 am

Re: Motor Imagery - Incremental Learning

Post by Thibaut »

Hi,
First of all you must train your classifier (to have one) next the incremental scenario is here But when you see the scenario, the stimulation to "re"-train your classifier is send by acquisition server and when a train is send the classifier is reload. But in fact it's not a train with all previous data and all new data.

To learn with more than only one OV you can concat some files (remove intermediar trian stimulation to keep only last) and train your classifier with this new file.

Your pipeline is correct

The accuracy problem is common : The variability of eeg is really high on a same subject it evolves a lot during a day and is different between days. So between more subject the effect is higher.

With my previous answer you see it's difficult with your dataset. To test the better dataset it's complicated with OV. You can use matlab or python to stack all sample and next manage with some methods to select the best (artifact detection/reduction, signal process to amplify difference between task....). If you find a perfect method you have the graal of MTBCI.^^

Thibaut

Sofia
Posts: 10
Joined: Tue Aug 17, 2021 9:10 am

Re: Motor Imagery - Incremental Learning

Post by Sofia »

Thank you for your response Thibaut.

As I have already said, I created scenario "mi-csp-concatenate-multiple-files" in which I concatenate several .ov files using Signal Concatenation box and finally save the new file as "concatenated-file.ov".

I didn't remove the stimulations from the first files but it works fine.
Do I have to remove the stimulation of all files except the last one? and if yes, could you please explain me the reason?

You can find attached my scenario.
https://prnt.sc/26xpknn

Thanks again,
Sofia

Thibaut
Posts: 264
Joined: Wed Oct 31, 2018 9:14 am

Re: Motor Imagery - Incremental Learning

Post by Thibaut »

Hi,
Yes you must remove the "train" stimulation (often OVTK_StimulationId_Train) on all except the last. Because when the trainer box see this stimulation he train his classifier (or csp) and don't take the signal after the stimulation.
Thibaut

Post Reply