[pymvpa] Searchlight statistical inference

Roni Maimon ronimaimon at gmail.com
Tue Aug 11 17:18:13 UTC 2015


Hi all,
I'm rather new to pyMVPA and I would love to get your help and feedback.
I'm trying do understand the different procedures of statistical inference,
I can achieve for whole brain searchlight analysis, using pyMVPA.

I started by implementing the inference at the subject level (attaching the
code). Is this how I'm supposed to evaluate the p values of the
classifications for a single subject? What is the differences between
adding the null_dist to the sl level and the cross validation level?
My code:
clf  = LinearCSVMC()
splt = NFoldPartitioner(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()),
                          postproc=mean_sample())
null_sl = sphere_searchlight(null_cv, radius=3, space='voxel_indices',
                             enable_ca=['roi_sizes'])
distr_est = MCNullDist(repeater,tail='left', measure=null_sl,
                       enable_ca=['dist_samples'])

cv = CrossValidation(clf,splt,
                     enable_ca=['stats'], postproc=mean_sample() )
sl = sphere_searchlight(cv, radius=3, space='voxel_indices',
                        null_dist=distr_est,
                        enable_ca=['roi_sizes'])
ds = glm_dataset.copy(deep=False,
                       sa=['targets','chunks'],
                       fa=['voxel_indices'],
                       a=['mapper'])
sl_map = sl(ds)
p_values = distr_est.cdf(sl_map.samples) # IS THIS THE RIGHT WAY??

Is there a way to make sure the permutations are exhaustive?
In order to make an inference on the group level I understand I can
use GroupClusterThreshold.
Does anyone have a code sample for that? Do I use the MCNullDist's created
at the subject level?

Thanks,
Roni.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20150811/e8978543/attachment.html>


More information about the Pkg-ExpPsy-PyMVPA mailing list