[pymvpa] Combine the fMRI data with other data in the pattern analysis?
Michael Hanke
michael.hanke at gmail.com
Tue Mar 15 20:12:41 UTC 2011
On Tue, Mar 15, 2011 at 05:33:03PM +0100, Nynke van der Laan wrote:
> Dear Michael,
> it still does not work for me (I have version 0.4).
I'm afraid that this is not a surprise -- things are a bit convoluted
in 0.4.
> When I do:
> covariate_ds = Dataset([1,2,3,4,5,6,7,8,3,5,4,5,4,4,3,4,5,4,3,4,5,6,7,8,9,7,5,4,5,6,7,8,7,4,3,3,3,4])
> I get the error: AttributeError: 'list' object has no attribute
> 'copy'. Also making a Numpy array of it doesn't seem to help.
Yes, the 0.4 dataset was very picky. Take a look at
http://v04.pymvpa.org/modref/mvpa.datasets.base.html?highlight=dataset#dataset
for one, you'd need to pass you covariate as ``sample`` argument.
> But I do I understand correctly from your post that for version 0.4
> covariate_ds = [1,2,3,4,5,6,7,8,3,5,4,5,4,4,3,4,5,4,3,4,5,6,7,8,9,7,5,4,5,6,7,8,7,4,3,3,3,4]
> would also work?
Probably not.
> (I used that now for the analysis below which
> probably explains the error I get (see below).
>
> I have moderated your script a little to the following:
> class MyMeasure:
This would be: class MyMeasure(DatasetMeasure)
> def __call__(self, ds): # was: _call(self, ds) but gives an error:
> MyMeasure instance has no __call__ method
> cov_ds = mvpa.base.dataset.hstack(ds, cov)
0.4 does not have hstack() at all, and you'd need to recompose a
combined dataset by hand (extracting all relevant attribute and samples,
and merge them with your covariate). Maybe Yarik has an idea how to do
that in a non-ugly fashion with 0.4?
Michael
--
Michael Hanke
http://mih.voxindeserto.de
More information about the Pkg-ExpPsy-PyMVPA
mailing list