sklift.viz.plot_qini_curve

sklift.viz.base.plot_qini_curve(y_true, uplift, treatment, random=True, perfect=True, negative_effect=True)[source]

Plot Qini curves from predictions.

Parameters:
  • y_true (1d array-like) – Ground truth (correct) labels.
  • uplift (1d array-like) – Predicted uplift, as returned by a model.
  • treatment (1d array-like) – Treatment labels.
  • random (bool, default True) – Draw a random curve. Default is True.
  • perfect (bool, default False) – 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.
Returns:

Object that stores computed values.