SSVEP: problem with the SVM classifier

Working with OpenViBE signal processing scenarios and doing scenario/BCI design
Post Reply
roberto
Posts: 16
Joined: Fri Jan 03, 2014 4:41 pm

SSVEP: problem with the SVM classifier

Post by roberto »

Hello,

I am using the ssvep scenario (with Emotiv Epoc device), and I wanted to change the LDA classifier with a SVM classifier. I have some doubts/problems:

1. I read that with SVM classifier I have to shift the inputs of the Classifier trainer block by -0.5. I have not very clear this point, it is really only sufficiet to put a DSP befor the Classifier trainer with the equation x-0.5? And exactly why?
2. How I have to set the parameters of the GUI of the SVM Classifer block? Are default values basically good?

And then, what channels do you suggest me to select from the Emotiv Epoc? I thought O1 and O2. In this case, it makes sense to use the CSP filter?

Thanks in advance for any help. I apologize for my bad english.

Roberto

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

Re: SSVEP: problem with the SVM classifier

Post by jtlindgren »

Hi Roberto,

often parameter values are found in practice by trying different combinations and looking at cross-validation error. Some types of data scaling may help SVM but they do not appear to be implemented by OpenViBE (somebody correct me if I'm wrong).


Cheers,
Jussi

fabien.lotte
Posts: 112
Joined: Sun Mar 14, 2010 12:58 pm

Re: SSVEP: problem with the SVM classifier

Post by fabien.lotte »

Hi Roberto,

The output of the SVM in openvibe is between 0 and 1: if the outcome is closer to 0 it means the input data comes from one class, if it is closer to 1 it means the input data comes from the other class. In contrast, the LDA in openvibe gives an output which is negative if the input data belongs to one class, and positive otherwise. So if you want your SVM to behave as the LDA, you have to subtract 0.5, so it also gives a negative output for one class and a positive output for the other class. The simpleDSP with x-0.5 is indeed enough for that. If you don't care about your SVM behaving as the LDA, you don't have to do that (but make sure that the application or box that uses the SVM outputs knows that its output is something between 0 and 1).

Regarding the channels to use, you should indeed use most of the channels available in the occipital area for SSVEP (O1, Oz, O2, POz, etc.). If you use only two channels, you can still use the CSP but it will probably not make much difference.

Finally, regarding Jussi's comment, there are indeed no scaling procedure implemented in the OpenViBE's SVM, however you can easily do some simple normalization using the univariate statistics box and the simpleDSP box (e.g., to set all features to zero mean and unit standard deviation).

I hope this helps!

Best,
Fabien Lotte

roberto
Posts: 16
Joined: Fri Jan 03, 2014 4:41 pm

Re: SSVEP: problem with the SVM classifier

Post by roberto »

Jussi and Fabien, thank you so much for your help!

I will let you know the results that I will get.

Roberto

roberto
Posts: 16
Joined: Fri Jan 03, 2014 4:41 pm

Re: SSVEP: problem with the SVM classifier

Post by roberto »

Hi,

I am sorry, in reality I am confused. The output of the classifier processor used as a SVM classifier, is a stimulus that rappresent the label of the classification result. It is not a signal between 0 and 1; Am I wrong?

And Fabien, could you are more specific with the example of an implemeted normalization? How can I use together univariate statistics box and the simpleDSP box for the mean and the standard variation?

Thanks a lot in advance.

Roberto

Post Reply