[pymvpa] Searchlight + cross validation & significance
Xiangzhen Kong
bnucon at gmail.com
Fri Apr 13 11:16:03 UTC 2012
Thanks very much.
I followed what yaroslav said and I got the p-values for each lights. The
code is below:
-----------
permutator = AttributePermutator('targets', count=N)
distr_est = MCNullDist(permutator, tail='right', enable_ca=['dist_samples'])
sl = Searchlight(cv,
IndexQueryEngine(voxel_indices=Sphere(0),
event_offsetidx=Sphere(10)),
postproc=mean_sample(),
roi_ids=np.arange(nfeatures),
null_dist=distr_est,
enable_ca=['stats']
)
-----------
The solution is to add node 'null_dist' for the Searshlight.
Now I have another problem:
Is there a quick way to get the predicted values for each light?
The cv is like below:
---------
cv = CrossValidation(clfer, partitioner,
errorfx=lambda p, t: np.corrcoef(p, t)[0],
enable_ca=['stats'])
---------
The error function I use is to get the correlation between prediction and
true.
How can I get the prediction for each searchlight while I can get for one
light in one fold via cv.ca.stats.summaries[0].sets[0][1]?
Best.
Xiangzhen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20120413/a2905a1f/attachment.html>
More information about the Pkg-ExpPsy-PyMVPA
mailing list