[pymvpa] Pattern localization

Yaroslav Halchenko debian at onerussian.com
Fri Apr 24 19:26:19 UTC 2009


> >> SVM assigns weights per each category -- positive for +1, negative for
> >> -1. So it is just to sum up corresponding SVs accordingly... let me
> >> simply actually patch libsvm's LinearSVMWeights for now... I will let
> >> you know whenever it is done
> > Oh great! Thank you very much for putting so much work into this!
> working on it... although on the way stumbled upon some other elderly
> code which needed some attention ;)

so... seems to be done, although once again, interpretation of those is
not that straight ;)

in 477a7e98ebffd2d42266e9b5e8e14e49570e624b (which is in already pushed
yoh/master branch on alioth) I've added ability to parametrize
LinearSVMWeights of libsvm (only, no sg similar implementation yet) with
split_weights=True, and that would return then the weighted sum of SVs
per each (of 2) class. See test_datameasure.py for an example

the order of colums in that should correspond to the labels reported by
dataset.uniquelabels, but I've not done explicit testing for that yet --
so please be cautious ;) it is just that libsvm decides on its own order
-- I think I took care of mapping it back into original order, but who
knows ;)

-- 
Yaroslav Halchenko
Research Assistant, Psychology Department, Rutgers-Newark
Student  Ph.D. @ CS Dept. NJIT
Office: (973) 353-1412 | FWD: 82823 | Fax: (973) 353-1171
        101 Warren Str, Smith Hall, Rm 4-105, Newark NJ 07102
WWW:     http://www.linkedin.com/in/yarik        



More information about the Pkg-ExpPsy-PyMVPA mailing list