time based epoching and ii's relation with windowing functio

Concerning processing components: filters, file load/save, visualizations, communication ...
Post Reply
HA3
Posts: 21
Joined: Sun Nov 23, 2014 5:32 am

time based epoching and ii's relation with windowing functio

Post by HA3 »

If I configure The time based epoching box, with epoch duration = 1 second and epoch interval = .25 second , then it will generate epochs of 1 second every .25th of a second, which is mean that there will be an interference between the first output and the second output element, what I mean by interference that there would be a common elements between the first output and the second one, However if I configure the box with epoch duration = 1 second and epoch interval = 1 second, then there will be no common elements between the outputs.
.
To be more clear, lets assume that we have a signal generator , which is generate 4 samples per second periodically, namely {1, 2 , 3 ,4}. Then for first configuration , the output will be:

1st output --> {1,2,3,4}
2nd output --> {2,3,4,1} , note that the first three element is the same as the last 3 element of the previous output.

And for the second configuration, the output will be:

1st output --> {1,2,3,4}
2nd output --> {1,2,3,4} , and those values has no relation with the previous and generated in different time.

My questions is ;

1. Is that correct?
2. If it's correct, I see this box, as A rectangular window, which you could define how much would be shifted according to the time.
Thanks,
Note: This post is a clarification more than a question.

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

Re: time based epoching and ii's relation with windowing fun

Post by fabien.lotte »

Yes that is correct! This box is really there to perform EEG analysis with sliding windows. Typically we use it to compute EEG features over the past X seconds of data. For instance, in several BCI system we used, we compute the EEG signal band power in the last 1 second widow, with 15/16s overlap between consecutive window, i.e., we compute the EEG band power 16 times per second.

Best,
Fabien

hkn1304
Posts: 13
Joined: Tue Apr 18, 2017 5:44 am

Re: time based epoching and ii's relation with windowing fun

Post by hkn1304 »

Nearly 2 years have passed since last answer.

I hope there is anyone to answer my question. Is there a scientific reason why 15/16 overlap is used in CSP scenario in Openvibe with Time based epoching box? I found no clue about why this method is implemented.


Thanks in advance.

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

Re: time based epoching and ii's relation with windowing fun

Post by jtlindgren »

Just chiming in; I can imagine a few possible reasons,

1) Playing the cynical devils' advocate, it could be suggested that the overlap was a way to milk out better accuracy estimates from the classifier trainer boxes' cross validation without fully understanding that this practice does not automatically make the online session similarly more accurate. The explanation derives from the fact that by default (before ov 2.0), the cross-validation used to randomize the example order as is the standard practice in machine learning. However, due to the temporal correlations in the EEG, this way the chances increases that examples with very similar spectral characteristics will end up in both train and test folds. A classifier that simply overfits the train data will then do pretty well by just 'remembering the training set' since the test set will look pretty similar. Its like a school test where the students practices an almost identical test many times and eventually starts to get high scores. However, the student might be in a pickle in the final exam if the presented test is *different*. In EEG this final test tends to change over time (google 'nonstationarity').

Some more talk here, http://openvibe.inria.fr/tutorial-how-t ... te-better/

2) Being more nice, the splicing of the trial to small subsets in itself can be beneficial to get a more fine-grained control for applications. If you have 4 seconds of trial, you can use all the data of the trial to make a feature vector and thus get a very slow response (one control action guess per 4 seconds). You can split the trial to slices, and get as many predictions as you have slices. However, the smaller the slices, likely the less stable they are (speculation warning). Having overlapping epochs could be a kind of compromise to get big enough, reasonably stable slices while still getting predictions in a fine grained stream. Just when doing this it should be understood that this slicing affects the classifier due to changing the data the training uses (see #1), even if cross-validation is not used.

Yet another alternative to avoid biasing the classifier would be to use non-overlapping epochs on training and then simply slide a window in the online phase. But I'm not sure what kind of effects it would have in practice.


Best,
Jussi

Post Reply