[pymvpa] classifier prediction question

Jason Ozubko jozubko at research.baycrest.org
Thu Jan 16 21:14:46 UTC 2014


Perhaps a very newbie question but when you call clf.predict is it possible
to have the function return more than just a single prediction? As in, if I
have 4 target labels, is it possible to get, for each test sample, the
probability (or some other metric) with which the classifier thinks that
each of those 4 target labels apply?

So for example, if you had target types of "animal", "vegetable",
"mineral", and "person" and you trained up a classifier, then with
clf.predict I could submit a handful of test samples and get results like

["vegetable"
"vegetable"
"animal"
"person"
"mineral"
"mineral"]

But is there any way to instead get a read out that says something like,
for the first sample the classifier would have picked vegetable first, then
animal, then person, and lastly mineral.  For the second sample however the
classifier would have picked vegetable then person, then animal, then
mineral?  So I could see not only what option the model predicts but also
how close was each test sample to the other options as well?

Thanks in advance

Cheers,
Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20140116/74548e71/attachment.html>


More information about the Pkg-ExpPsy-PyMVPA mailing list