plot_decision_curve

plot_decision_curve(
    performance_data,
    decision_type='conventional',
    min_p_threshold=0,
    max_p_threshold=1,
    stratified_by=['probability_threshold'],
    size=600,
)

Plots a Decision Curve from pre-computed performance data.

This function is useful for plotting a Decision 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, including net benefit and probability thresholds. required
decision_type str Type of decision curve to plot. Defaults to "conventional". 'conventional'
min_p_threshold float The minimum probability threshold to plot. Defaults to 0. 0
max_p_threshold float The maximum probability threshold to plot. Defaults to 1. 1
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 Decision Curve.