mne-tools / mne-python

MNE: Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python
https://mne.tools
BSD 3-Clause "New" or "Revised" License
2.7k stars 1.31k forks source link

add motor imagery BCI dataset example #1232

Closed agramfort closed 10 years ago

agramfort commented 10 years ago

now that we have support for EEG file formats it should be easy to add a BCI dataset with motor imagery that would be processed with CSP.

any volunteer?

agramfort commented 10 years ago

possible data:

http://www.physionet.org/physiobank/database/eegmmidb/ see http://www.physionet.org/physiobank/database/eegmmidb/S001/

data is in edf format.

data from http://bbci.de/competition/iv/#download

cannot be downloaded without password....

mbillingr commented 10 years ago

You may be interested in this: https://github.com/SCoT-dev/scot-data but it is only a small data set in dull old .mat file format.

agramfort commented 10 years ago

thanks

would you consider updating our CSP example (or create a new one) with a nice motor imagery dataset?

http://martinos.org/mne/stable/auto_examples/decoding/plot_decoding_csp_space.html#example-decoding-plot-decoding-csp-space-py

dengemann commented 10 years ago

Also note that we plan to add custom 'from_data' constructors very soon that would allow you to create Raw / Epochs from e.g. mat files

mbillingr commented 10 years ago

I will look into it. This might be a nice way to get started with MNE :)

mbillingr commented 10 years ago

Uh.. I think I discovered an evil bug in RawEDF._read_segment.

There is a stimulation channel containing ascii encoded strings, which is resampled before being incorrectly parsed. Interested in a fix?

agramfort commented 10 years ago

sure pull request welcome

mbillingr commented 10 years ago

nice ID: #1234

mbillingr commented 10 years ago

@agramfort Finally, I've patched together a CSP example with motor imagery data: https://github.com/kazemakase/mne-python/blob/csp-bci-example/examples/decoding/plot_decoding_csp_eeg.py

I noticed that the CSP returns normalized band power (mean, std). Is there a reason for this particular normalization? We usually use log-bandpower for classification because this makes the features more normally distributed.

Another curiosity is that the CSP does not work with the empirical covariance. Eigenvalue decomposition complains that the covariance matrix is not positive definite. Using Ledoit-Wolf shrinkage fixes that problem. However, it is strange that the empirical covariance does not work here.

agramfort commented 10 years ago

@agramfort https://github.com/agramfort Finally, I've patched together a CSP example with motor imagery data: https://github.com/kazemakase/mne-python/blob/csp-bci-example/examples/decoding/plot_decoding_csp_eeg.py

nice. Please open a PR asap.

I noticed that the CSP returns normalized band power (mean, std). Is the a reason for this particular normalization? We usually use log-bandpower for classification because this makes the features more normally distributed.

no reason just ignorance :) I don't work much with CSP. Thanks for the tip ;)

agramfort commented 10 years ago

to PR #1267