On 11/28/2014 10:57 PM, Mathieu Blondel wrote: > > - introduce a new method predict_score / predict_confidence (pro: > duck-typing friendly, con: one more method) > - use isinstance(estimator, RegressorMixin) to detect regressors (pro: > simple, con: assume inheritance) > - make decision_function an alias of predict in all regressors (pro: > simple, con: can no longer detect classifiers with > hasattribute(estimator, "decision_function")) > - call predict if neither predict_proba nor decision_function are > available (pro:simple, con: can't raise an exception for classifiers > with predict only) > > What do people think? I think I would currently favour the "decision_function" option. Do we ever make use of the presence of "decision_function" to decide whether something is a classifier? I am not aware of any.
On a side note: when do we need to distinguish classifiers and regressors? We currently use it to switch between stratified cross-validation and k-fold cross validation mainly, right? And it is currently implemented using inheritance (so third-party estimators are regressors by default). After fitting, I think the presence of ``classes_`` would be a good way to detect a classifier, but I guess we need that information before for cross-validation. Cheers, Andy ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk _______________________________________________ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general