plot_lift_curve
plot_lift_curve(
performance_data,
stratified_by=['probability_threshold'],
size=600,
)Plots a Lift curve from pre-computed performance data.
This function is useful for plotting a Lift curve directly from a DataFrame that already contains the necessary performance metrics.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| performance_data | pl.DataFrame | A Polars DataFrame with performance metrics. It must include columns for the lift values and the percentage of the population targeted, along with any stratification variables. | required |
| stratified_by | Sequence[str] | The columns in performance_data used for stratification. Defaults to ["probability_threshold"]. |
['probability_threshold'] |
| size | int | The width and height of the plot in pixels. Defaults to 600. | 600 |
Returns
| Name | Type | Description |
|---|---|---|
| Figure | A Plotly Figure object representing the Lift curve. |