sklift.viz.base.plot_qini_curve(y_true, uplift, treatment, random=True, perfect=True, negative_effect=True, ax=None, name=None, **kwargs)[source]

Plot Qini curves from predictions.

  • y_true (1d array-like) – Ground truth (correct) binary labels.

  • uplift (1d array-like) – Predicted uplift, as returned by a model.

  • treatment (1d array-like) – Treatment labels.

  • random (bool) – Draw a random curve. Default is True.

  • perfect (bool) – Draw a perfect curve. Default is True.

  • negative_effect (bool) – If True, optimum Qini Curve contains the negative effects (negative uplift because of campaign). Otherwise, optimum Qini Curve will not contain the negative effects. Default is True.

  • ax (object) – The graph on which the function will be built. Default is None.

  • name (string) – The name of the function. Default is None.


Object that stores computed values.


from sklift.viz import plot_qini_curve

qini_disp = plot_qini_curve(
    y_test, uplift_predicted, trmnt_test,
    perfect=True, name='Model name'

qini_disp.figure_.suptitle("Qini curve");