libuplift.metrics.regression ============================ .. py:module:: libuplift.metrics.regression .. autoapi-nested-parse:: Metrics to assess performance of uplift regression task Functions named as ``*_score`` return a scalar value to maximize: the higher the better Function named as ``*_error`` or ``*_loss`` return a scalar value to minimize: the lower the better .. !! processed by numpydoc !! Functions --------- .. autoapisummary:: libuplift.metrics.regression.e_sate libuplift.metrics.regression.e_satt libuplift.metrics.regression.sim_gain_at libuplift.metrics.regression.sim_gain Module Contents --------------- .. py:function:: e_sate(y_true, y_pred, trt, n_trt=1) Absolute error on Sample Average Treatment Effect. Works by computing ATE using model predictions and true outcomes. Absolute value of the difference between the two values is returned. For multiple treatments, return weighted average. This measure is not very effective. .. !! processed by numpydoc !! .. py:function:: e_satt(y_true, y_pred, trt, n_trt=1) Absolute error on Sample Average Treatment Effect on the Treated. Works by computing ATT using model predictions and true outcomes. Absolute value of the difference between the two values is returned. For multiple treatments, return weighted average. This measure is not very effective. .. !! processed by numpydoc !! .. py:function:: sim_gain_at(y_true, y_pred, trt, n_trt=None, *, quantile=0.5) Simulated on-policy gains at given quantile of targeted population. For mulitple treatments, the most beneficial treatment of each case is selected. Enough data must be present in all treatments for the measure to be well defined. .. !! processed by numpydoc !! .. py:function:: sim_gain(y_true, y_pred, trt, n_trt=None, *, quantile=0.5) Simulated on-policy gains for the whole population. .. !! processed by numpydoc !!