2012/10/24 Alexandre Gramfort <[email protected]>: > hi folks, > > I apologize if this was already a discarded option above but I read quickly. > > how about putting the logic in cross_val_score and GridSearchCV and just > "inspect" if the score_func to see it expects a parameter called "estimator"? > that would then mean calling the score func with (estimator, X) for > unsupervised > and (estimator, X, y) for supervised. > > the existing code would still work and for advanced use cases it could fly to.
Arguments inspection would be a good way to deal with backward compat indeed. However I would still mark the non-estimator API deprecated with a warning with maybe +4 releases (1 year deprecation) to get rid of arg introspection later and always require the __call__(estimator, X, y=None) API in the long run. -- 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
