sklift.viz.plot_treatment_balance_curve

sklift.viz.base.plot_treatment_balance_curve(uplift, treatment, random=True, winsize=0.1)[source]

Plot Treatment Balance curve.

Parameters:
  • 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.
  • winsize (float, default 0.1) – Size of the sliding window to apply. Should be between 0 and 1, extremes excluded.
Returns:

Object that stores computed values.