P300 LDA classifier with GDF and OV input files

Concerning processing components: filters, file load/save, visualizations, communication ...
Post Reply
TPAC
Posts: 12
Joined: Thu Mar 10, 2011 10:30 am

P300 LDA classifier with GDF and OV input files

Post by TPAC »

Hi all,

I succeeded in training an LDA classifier for a P300 BCI application, using experimental data recorded in a .ov file.
I tried to do the same job with the same data but first converted in a GDF file. In this case, my scenario is not working, and is pending forever...
It seems that information is missing in the GDF file.

I attach the scenarios I used, both for trainings and conversion from .ov to .gdf.

Could someone tell me what I did wrong ?

Thank you in advance,

TPAC
Attachments
train_classifier_with_gdf_input.xml
My training scenario with GDF as input, which is KO
(43.76 KiB) Downloaded 284 times
train_classifier_with_ov_input.xml
My training scenario with .ov file in input, which is OK
(44.58 KiB) Downloaded 276 times
ov2gdf.xml
Conversion from .ov to .gdf
(13.11 KiB) Downloaded 287 times

ddvlamin
Posts: 160
Joined: Thu Aug 13, 2009 8:39 am
Location: Ghent University
Contact:

Re: P300 LDA classifier with GDF and OV input files

Post by ddvlamin »

Hello,

For some reason I could not download your scenarios (just empty files when I downloaded them). So I don't know how you converted them and thus maybe I will say irrelevant and stupid things.

The problem with the GDF writer is that you can only write one stream of stimulations and you need two, the first for the sequence stimulations and the second stream for the targets. So if you still want to use gdf you need to write two gdf files, one that contains the data + sequence stimulations and one that contains the data + target stimulations.

I don't know if it is possible to use the multiplexer to transform them into one stream, but then you still have to somehow demix them when you read them?

Or maybe you found a way of converting them, but the end of file event that should trigger the training is not included.

Best regards,
Dieter Devlaminck

TPAC
Posts: 12
Joined: Thu Mar 10, 2011 10:30 am

Re: P300 LDA classifier with GDF and OV input files

Post by TPAC »

Hello ddvlamin,

Thank you for your quick response !

As you explained, the difference between the generic stream reader/writer and gdf reader/writer is the number of streams of stimulations available (limited to 1 in the case of gdf). Your idea is great and is totally working for me:

1) convert the .ov file into two different .gdf files, the first containing the sequence stimulations and the second containing stream for the targets
2) then reopen each gdf file and connect each stream into what you want (for instance the P300 speller visualisation).

I did not have to use the multiplexer box and could reproduce the same results as those obtained with the .ov file...

So thanks a lot !

TPAC

yrenard
Site Admin
Posts: 645
Joined: Fri Sep 01, 2006 3:39 pm
Contact:

Re: P300 LDA classifier with GDF and OV input files

Post by yrenard »

Dear TPAC and Dieter,

actually, it would be possible to mux the two stimulation streams in only one but there would be similar stimulation ids for different purpose. In both stream, we use OVTK_StimulationId_Label_* to tell what line/column to flash and what line/column to select. So if you had to mux the two streams, you would definitely want to also translate the target stimulation ids so they don't have the same ids than the flashing sequence. Then you'd have to do the inverse transformation when reading back !

If the double GDF file if fine for you, then go for it, it's easier even if probably non convenient ;)

Best regards,
Yann

ddvlamin
Posts: 160
Joined: Thu Aug 13, 2009 8:39 am
Location: Ghent University
Contact:

Re: P300 LDA classifier with GDF and OV input files

Post by ddvlamin »

Dear Yann,

ok, thanks for the hint, this should indeed be more convenient :) , I will see if I can change the scenario appropriately because I (and probably others too) do my offline analysis mainly in another framework for prototyping new algorithms, hence the need for gdf files.

Best regards,
Dieter

Post Reply