Help understanding the train trigger

Working with OpenViBE signal processing scenarios and doing scenario/BCI design
Post Reply
caitlinvz
Posts: 4
Joined: Wed Nov 02, 2016 11:20 pm

Help understanding the train trigger

Post by caitlinvz »

Hi there,

I cannot seem to get the trainer working with data from a CSV file.

I am trying to get a LDA training working on a CSV dataset from Emotiv. I have written a python script to read the emotiv csv and to convert it to a csv readable by openvibe. At the same time the script creates a stimulation file with time and duration parameters for each stimulation.

These stimulations are numbered (in this case 6 to 11) and each number corresponds to a mental command.

I cannot find out what stimulation the Classifier trainer needs to train. Here is an example of my stimulation csv:

Time (s),Identifier,Duration
72.902000,10,5.511000
83.743000,7,5.120000
96.436000,10,5.033000
106.074000,8,4.557000
119.392000,6,5.002000
............
.............
228.951000,6,5.291000
238.378000,8,5.096000
............

What do I need to add to correctly trigger the Training Classifier?
More specifically
[*]Does it require a something like a OVTK_StimulationId_Train at the beginning of the training file?
[*]Or does it require a stimulation that is simultaneous with the mental command tag?
[*]Or does it require a stimulation at the end after all the epochs have been sent through?

At the same time are there specific stimulations that I need to add at the beginning and end of the files to start and end the scenario?

Your help would be greatly appreciated.
Caitlin

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

Re: Help understanding the train trigger

Post by jtlindgren »

Hi Caitlin,

the Classifier Trainer box works as follows,

- It has several input connectors, one per class. You send all the feature vectors corresponding to one class to one connector.
- The Classifier Trainer stores all the received feature vectors internally
- After you have sent all the feature vectors to the classifier trainer, you tell it to train the classifier with a specific stimulation
- This stimulation can be selected in the Classifier Trainer box configuration.
- This stimulation probably needs to have a timestamp which is later than all the feature vector timestamps

You can see mapping between numeric stimulation codes and their 'human readable' labels here : http://openvibe.inria.fr/stimulation-codes/

You can also use Stimulation Listener box to snoop that the stimulation stream carries what you expect it to carry, including timestamps.
EBML Stream Spy can be used to look at the feature vector stream contents timestamps, if needed.

Btw, Stream Switch can be used to route the data to the different classifier trainer sockets. Look at the bundled OV
BCI scenarios for examples.


Hope this helps,
Jussi

Post Reply