libuplift.base ============== .. py:module:: libuplift.base .. autoapi-nested-parse:: Base classes for all estimators and trasformers. .. !! processed by numpydoc !! Classes ------- .. autoapisummary:: libuplift.base.UpliftRegressorMixin libuplift.base.UpliftClassifierMixin libuplift.base.UpliftTransformerMixin Functions --------- .. autoapisummary:: libuplift.base.is_uplift Module Contents --------------- .. py:class:: UpliftRegressorMixin Bases: :py:obj:`_BaseUpliftMixin`, :py:obj:`sklearn.base.RegressorMixin` Mixin class for all uplift regression estimators in libuplift. .. !! processed by numpydoc !! .. py:method:: score(X, y, trt, n_trt=None, sample_weight=None) Score test data. By default difference between model predicted and sample ATE is returned (e_sate). .. !! processed by numpydoc !! .. py:class:: UpliftClassifierMixin Bases: :py:obj:`_BaseUpliftMixin`, :py:obj:`sklearn.base.ClassifierMixin` Mixin class for all uplift classification estimators in libuplift. .. !! processed by numpydoc !! .. py:method:: predict_action(X, pos_label=None) Predict most beneficial action. Only supported for binary classification or when pos_label is set. pos_label must be an intereger between 0 and ``self.n_classes_-1``. .. !! processed by numpydoc !! .. py:method:: score(X, y, trt, n_trt=None, sample_weight=None) Score test data. By default difference between model predicted and sample ATE is returned (e_sate). .. !! processed by numpydoc !! .. py:class:: UpliftTransformerMixin Bases: :py:obj:`object` .. py:method:: fit_transform(X, y=None, trt=None, n_trt=None, **fit_params) .. py:function:: is_uplift(estimator) Returns True if the given estimator is an uplift model. :Parameters: **estimator** : object Estimator object to test. :Returns: **out** : bool True if estimator is an uplift model and False otherwise. .. !! processed by numpydoc !!