[pymvpa] Combine the fMRI data with other data in the pattern analysis?
Nynke van der Laan
nynkevanderlaan at gmail.com
Tue Mar 15 16:33:03 UTC 2011
Dear Michael,
it still does not work for me (I have version 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.
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? (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:
def __init__(self, measure, cov):
self._msre = measure
self._cov = cov
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)
return self._msre(cov_ds)
However, now I get the AttributeError: 'module' object has no
attribute 'dataset' when I use, which probably originates by the fact
that the covariate_ds I use is just a list. How can I do this in 0.4?
Did the architecture of the dataset baseclass change in version 0.6 or
am I doing something wrong?
cv = CrossValidatedTransferError(
TransferError(LinearNuSVMC()),
NFoldSplitter())
m_nynke = MyMeasure(cv, covariate_ds)
sl = Searchlight(m_nynke, radius=6)
sl_map = sl(dataset)
Thanks!
More information about the Pkg-ExpPsy-PyMVPA
mailing list