libuplift.metrics.regression#

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

Functions#

e_sate(y_true, y_pred, trt[, n_trt])

Absolute error on Sample Average Treatment Effect.

e_satt(y_true, y_pred, trt[, n_trt])

Absolute error on Sample Average Treatment Effect on the Treated.

sim_gain_at(y_true, y_pred, trt[, n_trt, quantile])

Simulated on-policy gains at given quantile of targeted

sim_gain(y_true, y_pred, trt[, n_trt, quantile])

Simulated on-policy gains for the whole population.

Module Contents#

libuplift.metrics.regression.e_sate(y_true, y_pred, trt, n_trt=1)[source]#

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.

libuplift.metrics.regression.e_satt(y_true, y_pred, trt, n_trt=1)[source]#

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.

libuplift.metrics.regression.sim_gain_at(y_true, y_pred, trt, n_trt=None, *, quantile=0.5)[source]#

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.

libuplift.metrics.regression.sim_gain(y_true, y_pred, trt, n_trt=None, *, quantile=0.5)[source]#

Simulated on-policy gains for the whole population.