[pymvpa] Confusion Matrix for each Node with sphere_gnbsearchlight
Yaroslav Halchenko
debian at onerussian.com
Fri Aug 28 13:16:38 UTC 2015
On Fri, 28 Aug 2015, marco tettamanti wrote:
> Dear all,
> is it possible to obtain confusion matrices for all nodes with
> "sphere_gnbsearchlight", as was suggested before with
> "sphere_searchlight":
> slcvte = CrossValidation(clf, partitioner, errorfx=None,
> postproc=ChainNode([Confusion(labels=fds.UT)]))
> class KeepConfusionMatrix(Node):
> def _call(self, fds):
> out = np.zeros(1, dtype=object)
> out[0] = (fds.samples)
> return out
> slcvte.postproc.append(KeepConfusionMatrix())
> slght = sphere_searchlight(slcvte, radius=slradius, space='voxel_indices',
> nproc=4, postproc=mean_sample())
> slght_map = slght(fds)
quick an possible partial reply
1. "not sure" -- if it pukes then probably not, although judging from
the code I foresaw arbitrary shape of the errorfx output
2. but you could make sphere_gnbsearchlight to return labels (not
errors) and then post-process to get those confusion matrices. Just
specify errorfx=None to it (not to CV). But you could also try
passing errorfx=ConfusionMatrixError and see how that goes
Please share what you discover/end up with.
mvpa2/tests/test_usecases.py has more of usecase demos for gnb
searchlights which might come handy
--
Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
Research Scientist, Psychological and Brain Sciences Dept.
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834 Fax: +1 (603) 646-1419
WWW: http://www.linkedin.com/in/yarik
More information about the Pkg-ExpPsy-PyMVPA
mailing list