[pymvpa] extracting sample predictions from a searchlight
Brian Murphy
brian.murphy at qub.ac.uk
Tue Apr 5 19:52:56 UTC 2016
Dear PyMVPAers,
in a searchlight analysis, I would like to be able to extract the
individual predictions for each sample, on every cross-validated
searchlight.
Why, I hear you ask? Currently I'm getting very marginal results for my
classifier, and I would like to boost sensitivity by amalgamating
results across the 20+ participants that I have access to. The idea
would be to take a committee classification decision for each test
sample, across the 20+ participants (e.g. by majority voting of the
prediction, or a mean of a graded measure like the probabilities that a
logistic regression gives).
So far I've looked at the postproc argument of
mvpa2.measures.searchlight.sphere_searchlight but don't seem to be able
to dig down deeper than the foldwise error rates. On my reading the
results_* parameters are not relevant to my question.
Should I instead be writing a custom function to read out and record
from each instance of the CrossValidation, with its postproc attribute
(e.g. via CrossValidation.stats.sets)?
My current classifier definition is this:
> # searchlight classifier
> searchLightSize = 3
> clf = PLR();
>
> cv = CrossValidation(clf, NFoldPartitioner(),
> enable_ca=['probabilities', 'samples_error','stats',
> 'calling_time','confusion', 'estimates', 'predictions',
> 'repetition_results', 'raw_results', 'null_prob'])
>
> sl = sphere_searchlight(cv, radius=searchLightSize,
> postproc=mean_sample())
>
Ideas and suggestions welcome!
best,
Brian
More information about the Pkg-ExpPsy-PyMVPA
mailing list