[pymvpa] question about the use of channeldataset

Sander Koelstra sander.koelstra at googlemail.com
Wed Oct 28 00:03:57 UTC 2009


Hi,

I just started using PyMVPA and so far I'm liking it a lot, but I've
run into an issue with the ChannelDataset.

I'm using it to analyze EEG data, which I load into a ChannelDataset.
Now I'm trying to make some mappers that do feature extraction.
However, I'm running into a problem with the 1D-nature of the PyMVPA
data.
As a starting exercise I started writing a mapper that basically
calculates the variance in sliding windows of the data. My problem is
that Mapper.forward() only operates on the raw 1D-data, not a Dataset
and there is no way there to get the original data samples (organized
into trials*channels*samples).
This is a problem since I obviously don't want the sliding windows to
include data from the end of one channel and the beginning of the
next, which is what would happen if I took the sliding windows from
the 1D vector.
I can imagine many other cases where I would need the original channel
data in mappers (I'll be implementing the Common Spatial Patterns
algorithm next for instance). What's the correct way (if any) of
dealing with this ?

I've implemented an ugly workaround now by storing the ChannelDataset
Mapper during the call to my WindowMapper.train() (which does take a
Dataset as input) and then reverse-mapping the data in
WindowMapper.forward() using that ChannelDataset Mapper. However, that
doesn't seem the right way to go about this...

Related to this I noted that this is also a bit of a problem when
using the ICA or PCA mappers (Which optimally would also operate on
separate channels).

Thanks in advance for any help,

Sander Koelstra



More information about the Pkg-ExpPsy-PyMVPA mailing list