How to make the motor imagery CSP work ?

Working with OpenViBE signal processing scenarios and doing scenario/BCI design
Post Reply
kiyarash
Posts: 27
Joined: Tue Apr 11, 2017 10:44 am

How to make the motor imagery CSP work ?

Post by kiyarash »

It has been a while since I have tried to make the motor imagery csp scenario work.

At first I was using the emotive headset which didn't have the required electrodes (like cz ,c1,c2,c3).

so I switched to Mitsar 202 which did cover that area and had 31 channels.

I also read in the forum that exercising is required for motor imagery. there were two articles mentioned :

"Graz-BCI: State of the Art and Clinical Applications", G. Pfurtscheller, C. Neuper, G. R. Müller, B. Obermaier, G. Krausz,
A. Schlögl, R. Scherer, B. Graimann, C. Keinrath, D. Skliris,, M. Wörtz, G. Supp, and C. Schrank,
IEEE Trans. Neural Systems and Rehabilitation Engineering, 2003.

and

"Control of a two-dimensional movement signal by a noninvasive brain–computer interface in humans",
Jonathan R. Wolpaw and Dennis J. McFarland, PNAS, 2004.

but neither had any info about any type of exercise that would improve motor imagery so I just practiced by actually doing the hand movements (opening and closing my right/left hand) and also practiced some imagery.


I also tried adjusting two other parameters :

1. Temporal filter interval : I ran scenarios 2 and 3 for intervals of 8-12,12-16, ...,28-32 (Hz) in the temporal filter. the reported accuracy of cross validation in the best interval(20-24) was 80 percent which was almost the same as using the general filter of 8-30. But when I used scenario 4 and 5 to get new data and to test for the real accuracy of the model I got an accuracy of 60 at best. and for other cases I got an accuracy of 50% (technically non). (I also adjusted the filter interval in scenario 4 and 5)

2. Length of training: I also tried making each instance of right/left imagination longer in scenario 1 by 4 sec. I thought that having more data would help. I also made the offset 1 sec instead of 0.5 but it decreased the accuracy of cross validation and for new data I got an accuracy of 50% again. (I also adjusted all the "stimulation based epoching" boxes)


to check for the accuracy of the model I ran scenario 4 once. then adjusted scenarios 2,3,5 for different cases and used the file recorded in scenario 4 in scenario 5.

I thought about changing the classifier (I used the default LDA). But it seems that wouldn't help since I have no accuracy at all.

here are my final thoughts:

1.in case the data I record from myself is not good. Is there a way to test the scenario on prerecorded data? are there any proper recordings of motor imagery available online? is there an easy way of running the scenario on them ?

2. even considering that the scenario works well on the prerecorded data how can I make the scenario usable for untrained people that are going to use it ?

Best regards,
Kiyarash

jtlindgren
Posts: 775
Joined: Tue Dec 04, 2012 3:53 pm
Location: INRIA Rennes, FRANCE

Re: How to make the motor imagery CSP work ?

Post by jtlindgren »

Hi Kiyarash,

a few suggestions,

1) collect train data twice, train with first, use the second file as test. this rules out optimism in the cross validation as well as possible feedback effects in online (bad results may make you do even worse). The accuracies on the second set are more indicative of the true accuracy than the cross validation.

2) make sure the imagery is kinesthetic (and not e.g. visual). Should have electrode configs including and around C3 and C4.

3) You can find a decent size classic set of openvibe motor imagery data here,

http://openvibe.inria.fr/datasets/

Many of those files result in okayish accuracies.

I've run the OV CSP motor imagery many times on different subjects, for some it works, for some it doesn't. For me it depends a bit on the feeling of flow, sometimes I get into it and start to get decent results but noise, distractions and frustrations can easily knock me back to nonperformance.


Hope this helps,
Jussi

kiyarash
Posts: 27
Joined: Tue Apr 11, 2017 10:44 am

Re: How to make the motor imagery CSP work ?

Post by kiyarash »

thanks for the quick reply.

1.thinking back at it the feedback in 4 did discourage me. I will take two test sets next time.

2.that could be the problem. may be I was too visual. But how can I make the imagery kinesthetic ?
would you point me to any articles or exercises or any tips on how to do that ? or even more importantly how to teach others how to do it ? (since by nature it is hard to imagine movement while your hands are not moving at all.)

3.I will check them out.

thanks for your help.

Jeff_B
Posts: 37
Joined: Wed Apr 11, 2012 1:31 pm
Location: Nice - Alpes Maritimes

Re: How to make the motor imagery CSP work ?

Post by Jeff_B »

Maybe enlarging the number of trials (collecting more signals) for each class could help it to train/generalize/work better online ?

in mi-csp-1-acquisition.xml:

<Setting>
<TypeIdentifier>(0x007deef9, 0x2f3e95c6)</TypeIdentifier>
<Name>Number of Trials for Each Class</Name>
<DefaultValue>20</DefaultValue>
<Value>20</Value>
<Modifiability>false</Modifiability>
</Setting>

Did you try to train another classifier ? (default is LDA I think)

Post Reply