libuplift.classifiers.classifier_as_regressor ============================================= .. py:module:: libuplift.classifiers.classifier_as_regressor .. autoapi-nested-parse:: Use a classifier as a regressor. By default return predicted probabilities as numeric predictions. .. !! processed by numpydoc !! Classes ------- .. autoapisummary:: libuplift.classifiers.classifier_as_regressor.ClassifierAsRegressor Module Contents --------------- .. py:class:: ClassifierAsRegressor(estimator, response_method='predict_proba', pos_label=1) Bases: :py:obj:`sklearn.base.MetaEstimatorMixin`, :py:obj:`sklearn.base.RegressorMixin`, :py:obj:`sklearn.base.BaseEstimator` Wraps a classifier such that it behaves like a regressor. The predict method returns by default predicted probability for class specified by ``pos_label`` (default 1). The method used for prediction can be changed by passing the response_method argument. If ``response_method returns a vector`` (e.g. ``decision_function``) ``pos_label`` will be ignored. :Parameters: **estimator** : a scikit-klearn classifier Classifier to wrap in a regessor interface. **response_method** : string, default='predict_proba' Classifier's method to use for making predictions. **pos_label** : integer, default=1 Label whose probability should be returned by regressor's predict method. .. !! processed by numpydoc !! .. py:method:: fit(*args, **kwargs) .. py:method:: predict(*args, **kwargs)