[pymvpa] Combine the fMRI data with other data in the pattern analysis?
Yaroslav Halchenko
debian at onerussian.com
Tue Mar 15 21:19:07 UTC 2011
On Tue, 15 Mar 2011, Michael Hanke wrote:
> 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?
for me everything in 0.4 shines with beauty ;)
why not just constructing a lightweight dataset right there, e.g.:
def __call__(self, ds):
cov_ds = Dataset(samples=N.hstack((ds.samples, cov)),
labels=ds.labels, chunks=ds.chunks)
# call you original measure, e.g. CrossVal... on this new cov_ds
# here, e.g.
return cv(cov_ds)
where cov is just a numpy array (not even a dataset)
--
=------------------------------------------------------------------=
Keep in touch www.onerussian.com
Yaroslav Halchenko www.ohloh.net/accounts/yarikoptic
More information about the Pkg-ExpPsy-PyMVPA
mailing list