2012/10/23 Andreas Mueller <[email protected]>: > Am 23.10.2012 10:40, schrieb Olivier Grisel: >> WDYT? > Ok, so the tldr version is: option b), but use objects instead of functions. > > Using objects instead of decorators seems more readable. > Currently, the only tag we need is "higher is better", right?
Yes the other capabilities / requirements are encoded as the presence or absence of the other methods. Using classes instead of function also makes it possible to do easier code reuse for checking inputs using mixin base classes. > Why does the object need any other function apart from > "from_estimator", if it is only used in grid-search and > cross-validation? Those additional methods make it possible to declare capabilities / requirements of the score function explicitly and programmatically using duck typing. This is useful as a "documentation" IMHO: it will be easy to find all the available regression scoring tools by having a look at the class reference documentation for instance. If people don't like the additional methods, we could introduce additional boolean or categorical flags. The `from_estimator` method call be renamed `__call__(self, estimator, X, y=None)` as this is the main entry point for grid searching / cross validation if people prefer. -- Olivier http://twitter.com/ogrisel - http://github.com/ogrisel ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ Scikit-learn-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
