[pymvpa] sphere_gnbsearchlight & Monte Carlo Testing

wolf zinke wolf.zinke at ovgu.de
Tue Oct 9 14:49:41 UTC 2012


Hi,

I try to use sphere_gnbsearchlight for Monte Carlo Testing to speed 
things up a bit. After figuring out the difference of arguments between 
sphere_gnbsearchlight and sphere_searchlight, I was able to set up 
everything without an argument error. However, when I run the 
searchlight analysis, it produces an error. Maybe, I misunderstood the 
usage of the arguments for sphere_gnbsearchlight, especially the 
generator argument. Any ideas what I am doing wrong here?

thanks,
wolf

clf  = GNB()
splt = NFoldPartitioner(cvtype=2, attr='chunks')
repeater   = Repeater(count=100)
permutator = AttributePermutator('targets', limit={'partitions': 1}, 
count=1)
null_cv = CrossValidation( clf, ChainNode([splt, permutator], 
space=splt.get_space()), errorfx=mean_mismatch_error, 
postproc=mean_sample())
distr_est = MCNullDist(repeater, tail='left', measure=null_cv, 
enable_ca=['dist_samples'])
cv = CrossValidation(clf, splt, errorfx=mean_mismatch_error, 
enable_ca=['stats'], postproc=mean_sample(), null_dist=distr_est)
sl = sphere_gnbsearchlight(clf, cv, radius=3, space='voxel_indices', 
enable_ca=['roi_sizes'])
> ---------------------------------------------------------------------------
> ValueError                                Traceback (most recent call 
> last)
>
> /home/data/exppsy/zinke/binding/pub_related/mvpa_splitset_epispace/comb/<ipython 
> console> in <module>()
>
> /usr/lib/pymodules/python2.6/mvpa2/base/learner.pyc in __call__(self, ds)
>     237                                    "used and auto training is 
> disabled."
>     238                                    % str(self))
> --> 239         return super(Learner, self).__call__(ds)
>     240
>     241
>
> /usr/lib/pymodules/python2.6/mvpa2/base/node.pyc in __call__(self, ds)
>      82
>      83         self._precall(ds)
> ---> 84         result = self._call(ds)
>      85         result = self._postcall(ds, result)
>      86
>
> /usr/lib/pymodules/python2.6/mvpa2/measures/searchlight.pyc in 
> _call(self, dataset)
>     132
>     133         # pass to subclass
>
> --> 134         results = self._sl_call(dataset, roi_ids, nproc)
>     135
>     136         if 'mapper' in dataset.a:
>
> /usr/lib/pymodules/python2.6/mvpa2/measures/adhocsearchlightbase.pyc 
> in _sl_call(self, dataset, roi_ids, nproc)
>     366         # labels
>
>     367         combinations[:, 0] = labels_numeric
> --> 368         for ipartition, (split1, split2) in enumerate(splits):
>     369             combinations[split1.samples[:, 0], 1+ipartition] = 1
>     370             combinations[split2.samples[:, 0], 1+ipartition] = 2
>
> ValueError: need more than 1 value to unpack


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20121009/ae69497e/attachment.html>


More information about the Pkg-ExpPsy-PyMVPA mailing list