[pymvpa] Make own classifier, binary to multiclass

Yaroslav Halchenko debian at onerussian.com
Fri Dec 17 13:55:08 UTC 2010


On Fri, 17 Dec 2010, Thorsten Kranz wrote:
> I'm trying to implement a classifier using a Cellular Neural Network
> (CNN, cp. Chua 1998). Though it comes from image processing, It can be
> used to do some binary classification. I want do incorporate it in the
> standard PyMVPA mechanisms, i.e. make it a classifier that can be
> trained, predict, and thus easily be used in a Cross Validation.
cool

> I would cherish a hint how to do this correctly.

> - The "BinaryCNNClassifier", from which class should it inherit? I
> guess not BinaryClassifier, as it is Meta Classifier and takes
> poslabels, neglabels arguments.
correct -- you want to subclass regular Classifier.

which branch of PyMVPA are you hacking on top? it might be worth getting
right away to the bleeding edge 0.6 development happening in the master
branch, but since it is substantially different from 0.4 and 0.5,
if you want to use it right away with your scripts created for 0.4
versions -- you better do it on top of 0.4.5.

may be look at mvpa/clfs/gnb.py  as the example; publish your code (or send
a patch) so we could help you out


also if you add proper tags (or _clf_internals in 0.4) and add it to
classifiers warehouse (mvpa/clfs/warehouse.py) then it would become a
part of many unittests -- so you could test it immediately ;)

> - When "BinaryCNNClassifier" is done, I would use MulticlassClassifier
> to enable its multiclass capabilities I guess
sounds right ;)

-- 
=------------------------------------------------------------------=
Keep in touch                                     www.onerussian.com
Yaroslav Halchenko                 www.ohloh.net/accounts/yarikoptic



More information about the Pkg-ExpPsy-PyMVPA mailing list