[pymvpa] WARNING: evil (stupid?) changes by yarik in yoh/master -- please review if you like them

Yaroslav Halchenko debian at onerussian.com
Sun May 25 22:41:24 UTC 2008


Dear Co-developers,

I've done another evil change and I have mixed feelings about it -- may
be I don't foresee some problems/inflexibility. In 2 words: I
think we should define all parameters of classifiers as 'Parameter' or
'KernelParameter', and subclass from Parametrized (for now it is  a
separate beast, but I think if you like it, we get just
ParametrizedClassifier as the base class for all our non-meta
classifiers).

Pros:

* all initial parameters of classifiers are groupped within .params or
  .kernel_params

* automated __str__ and __repr__ for such classifiers (with parameters
  at default values being omitted, which makes those __repr__ much more
  compact and digestable)

* no need to explicitly store given values in the __init__

* automatically beautified with
  dochelpers.enhancedClassDocString output of help(cls) in ipython

* validation of values to be assigned to a parameter if min/max/choices
  were specified, which later on could be used by 'OptimizedClassifier'
  ;)


Cons:

* some run-time overhead of object construction (though I don't think
  that we will create many classifiers all the time)

* complexity?

* inflexibility? (though since Parameter can contain anything as a
  value, I can't figure out what we get limited at)

As a testbed I've taken SMLR classifier and corresponding changes are in
034d13b7f12feb3 commit. Please please please have a look, and share your
opinions. -- it is not too late to revert!!!

-- 
Yaroslav Halchenko
Research Assistant, Psychology Department, Rutgers-Newark
Student  Ph.D. @ CS Dept. NJIT
Office: (973) 353-5440x263 | 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