OpenViBE forum

The OpenViBE community
It is currently Wed Dec 13, 2017 9:05 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: LDA classifier trainer
PostPosted: Fri Mar 11, 2016 7:40 pm 
Offline

Joined: Wed Oct 14, 2015 2:56 pm
Posts: 8
Hello

I am trying to understand the working of the classifier trainer box with different strategies like: native, one vs all, one vs one etc.
In the case of a native classifier, the .cfg file consists of two sets of weights and bias values. Could someone please explain as to why we get two sets of values and what do they correspond to? I have added an example of the ssvep scenario below (classifier-1.cfg):

<OpenViBE-Classifier-Box XMLVersion="3">
<Strategy-Identifier class-id="(0xffffffff, 0xffffffff)">Native</Strategy-Identifier>
<Algorithm-Identifier class-id="(0x2ba17a3c, 0x1bd46d84)">Linear Discrimimant Analysis (LDA)</Algorithm-Identifier>
<Stimulations>
<Class-Stimulation class-id="1">OVTK_StimulationId_Label_01</Class-Stimulation>
<Class-Stimulation class-id="2">OVTK_StimulationId_Label_02</Class-Stimulation>
</Stimulations>
<OpenViBE-Classifier>
<LDA version="1">
<Classes>1 2 </Classes>
<Class-config-list>
<Class-config>
<Weights> 2.914286e+000 5.335379e+000 5.171503e+000 5.738135e+000 4.520307e+000 4.525663e+000</Weights>
<Bias>-10.7541</Bias>
</Class-config>
<Class-config>
<Weights> 2.450198e+000 2.511593e+000 2.759214e+000 4.343394e+000 2.603230e+000 2.174770e+000</Weights>
<Bias>-3.4796</Bias>
</Class-config>
</Class-config-list>
</LDA>
</OpenViBE-Classifier>
</OpenViBE-Classifier-Box>


Thank You
Regards
Aravind R


Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 15, 2016 1:30 pm 
Offline

Joined: Fri Nov 14, 2014 1:06 pm
Posts: 40
Hi

LDA in OpenVibe is multiclass, and classifies a vector X in class k = argmax_i { P(class=i | vector=X) }
There is one set of weights associated to each class to compute P(class=i | vector=X).

For more details: plugins/processing/classification/src/algorithms/ovpCAlgorithmClassifierLDA.cpp and plugins/processing/classification/src/algorithms/ovpCAlgorithmLDADiscriminantFunction.cpp

Best regards


Top
 Profile  
Reply with quote  
PostPosted: Wed Mar 16, 2016 7:30 pm 
Offline

Joined: Wed Oct 14, 2015 2:56 pm
Posts: 8
Thank you so much!
Your clue on LDA implementation being multiple class, led me to PRML book by Bishop, where Chapter 4 explained a similar implementation.

I was initially looking at plugins/processing/classification/src/box-algorithms/ovpCBoxAlgorithmClassifierTrainer.cpp and processor.cpp. I will look into ovpCAlgorithmClassifierLDA.cpp and ovpCAlgorithmLDADiscriminantFunction.cpp, and will get back to you.

Something that we are trying to do is to use the same datasets and analyse on MATLAB so that our understanding of the algorithm gets better. We will try and study the code a bit more carefully and try to understand.

Thank You
Regards
Aravind R


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Americanized by Maƫl Soucaze.