SVM - 50% training accuracy

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

SVM - 50% training accuracy

Post by Sofia »

Hello everyone,

I am trying to compare the accuracy of LDA, MLP and SVM classification algorithms, of motor imagery scenarios with CSP spatial filter.
LDA and MLP works fine but when it comes to SVM, it always gives 50% as the training accuracy. (I tried it with 12 different eeg files)

I use 2 classes (left & right hand movements) and I know I have to shift by -0.5 since SVM gives results between [0,1].

My question is, where I should place the Simple DSP box (x-0.5)?

I want to get both training accuracy and cross validation test accuracy so do I need to shift values by -0.5 in scenario "mi-csp-3-classifier-trainer" since in the "online scenario" where we use "classifier prosessor" box, it doesn't give these accuracies? Or maybe is there a way to get both of those accuracies in the online scenario?

Please help me understand!

Thank you in advance

Thomas
Posts: 211
Joined: Wed Mar 04, 2020 3:38 pm

Re: SVM - 50% training accuracy

Post by Thomas »

Hi Sofia,

Can you tell me what version of OpenViBE you are using ?

As the results of the classification and the accuracy calculation are done within the Classification Trainer box. You cannot place a DSP box on the outside to modify that process. Also, what values do you want to shift exactly ?

And sorry, I'm not an expert in classificaiton, but how do you expect the shift you want to perform to impact the accuracy ?

Cheers,
Thomas

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

Re: SVM - 50% training accuracy

Post by Sofia »

Thank you for your reply Thomas.

The reason I want to shift the values by -0.5 is because with SVM, the results after classification is in the domain [0,1] (probabilities whilst with LDA we get the distance hyperplane). Since LDA gives negative and positive values in order to classify the 2 classes (negative values for class 1 and positive values for class 2) and since SVM only gives values between [0,1] whereas the values closer to 0 are for class1 and the values closer to 1 are for class2, if I substract 0.5 to the result it will occur a negative value for class1 and a positive value for class2. So, it will work as LDA classification.

The problm is that it always gives accuracy = 50% while with LDA I get results >88%.

Another thing that I noticed with SVM is that in the online scenario, when I use Matrix Display box with SVM as the selected classifier in Classification Processor, it only shows one box (for one class) and this might be the reason that I get 50% accuracy since it only recognises 1 class (right hand).

I am using version 3.1.0.

I would really appreciate your help!!

Post Reply