libuplift.metrics.curves#
Uplift and Qini curves.
Functions#
|
Uplift curve. |
|
Uplift curve. |
|
Qini curve. |
|
|
|
|
|
|
|
|
|
|
|
Qini coefficient introduced by Radcliffe and Surry. |
Module Contents#
- libuplift.metrics.curves.uplift_curve(y_true, y_score, trt, n_trt=None, pos_label=None, sample_weight=None)[source]#
Uplift curve.
Unless specified explicitly, y_true is assumed to be 0-1, with 1 the positive outcome.
This function implements the variant used by Rzepakowski and Jaroszewicz, where treatment and control curves are computed separately and subtracted.
- libuplift.metrics.curves.uplift_curve_j(y_true, y_score, trt, n_trt=None, pos_label=None, sample_weight=None)[source]#
Uplift curve.
Unless specified explicitly, y_true is assumed to be 0-1, with 1 the positive outcome.
This function implements the variant where scores are sorted jointly, see Verbeke, Nyberg, Verhelst.
- libuplift.metrics.curves.Qini_curve(y_true, y_score, trt, n_trt=None, pos_label=None, sample_weight=None)[source]#
Qini curve.
Qini curves proposed by Radcliffe et al. [1]. They differ from uplift curves by expressing uplift in terms of raw success counts on the treated group. Number of successes on the control group is scaled by the relative group sizes.
Only `separate’ variant is provided.
[1]Radcliffe, Nicholas J. (2007). “Using control groups to
target on predicted lift: Building and assessing uplift model”, Direct Marketing Analytics Journal, 14-21.
- libuplift.metrics.curves.optimal_uplift_curve(y_true, trt, n_trt=None, pos_label=None, sample_weight=None)[source]#