MEM predictor

Forum for discussion on different signal processing algorithms
Locked
tiziano
Posts: 18
Joined: 19 Oct 2008, 10:22

MEM predictor

Post by tiziano » 28 Mar 2009, 06:55

I have been using the old version of MEM predictor for a while. I have now noticed that it have been updated to a more efficient implementation.
The problem is that with exactly the same parameters the two algos give substantially different results.. is that correct? For my purposes I think the old version was better. I attach two spectra generated with the new and old algo computed for left hand motor imagery.

Image
Image

gschalk
Posts: 615
Joined: 28 Jan 2003, 12:37

mem

Post by gschalk » 28 Mar 2009, 12:06

Tiziano,

The old (i.e., about > 1 year old) and newer versions should be producing very similar results is configured similarly. Please note that the configuration for the new one is slightly different than for the old one. This is documented on

http://www.bci2000.org/wiki/index.php/U ... e:ARFilter

for the online system and on

http://www.bci2000.org/wiki/index.php/U ... _Files#mem

for the Matlab mem mex file.

From what you show, it looks like you are using a smaller model order on the new one (since the spectrum looks smoother).

Gerv

tiziano
Posts: 18
Joined: 19 Oct 2008, 10:22

Post by tiziano » 28 Mar 2009, 12:45

Gerv,

I'm referring to the file MEMPredictor.h that was updated yesterday by awilson. With revision 2279 of that file everything it's fine, instead with revision 2334 I have that smoothed effect.

Thanks,

Tiziano

gschalk
Posts: 615
Joined: 28 Jan 2003, 12:37

updated version ...

Post by gschalk » 28 Mar 2009, 15:37

Tiziano,

We will investigate right away. Can you please post a parameter file or dataset, and all other relevant instructions, that we can use to reproduce your two graph?

Thanks,
Gerv

jawilson
Posts: 109
Joined: 28 Feb 2005, 16:31

Post by jawilson » 28 Mar 2009, 16:30

Tiziano,
I am the one that made the update. I have reverted the MEMPredictor.h file to the old version that worked for you, so if you update with svn, it should go back to working as before.

I really apologize for the problems; I have been testing this update for about a week, and checked that the coefficients generated were identical to the old version for over 500 conditions, which it was out to 9 decimal places. We really wanted to make sure that this worked, because it is MUCH more efficient than the current version, but we didn't want to break it either. Please let me know if you still have problems, and in the meantime I will continue to work on the updated version.

Thanks for bringing this to our attention so quickly, so it didn't affect more people.

Adam Wilson

jawilson
Posts: 109
Joined: 28 Feb 2005, 16:31

Post by jawilson » 28 Mar 2009, 17:14

Tiziano,
I have updated the more efficient file, and I wanted to see if you would mind testing it with your data. It is at:
http://homepages.cae.wisc.edu/~jawilson/MEMPredictor.h

Could you place this file in the BCI2000/src/extlib/math/ folder, and re-compile the mem mex file? You can do this in matlab by going to the BCI2000/src/core/Tools/mex/ folder, and typing buildmex mem. Try running the mem file on your data again.

Alternatively, I would be more than happy to test it on your data as well. If you want to upload it, I can test it pretty quickly.

Here is a figure from each version on some EEG data, and the difference between each:
Image
So, I think the updated version is working correctly, but I want to make sure before submitting it again.

Thanks!
Adam

tiziano
Posts: 18
Joined: 19 Oct 2008, 10:22

success

Post by tiziano » 29 Mar 2009, 06:38

Hello Adam,

I've tried the new version and it works fine.. here are the new results:

Image
Image
Image

I used these params:

modelOrder=21
firstBinCenter=1
lastBinCenter=25
binWidth=1
evalPerBin=5
detrend=1

Thanks,

Tiziano

Locked

Who is online

Users browsing this forum: No registered users and 3 guests