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) – Draw a random curve. Default is True.

  • winsize (float) – Size of the sliding window to apply. Should be between 0 and 1, extremes excluded. Default is 0.1.

Returns

Object that stores computed values.