plot_calibration_curve: Plotting Calibration Curve

View source: R/plotting_utils.R

plot_calibration_curveR Documentation

Plotting Calibration Curve

Description

The plot_calibration_curve() function is specifically designed for binary classification and produces calibration curves that evaluate correspondence between predicted probabilities and observed frequencies. This function is restricted to binary classification problems and provides crucial information about the reliability of the model's probabilistic estimates.

Usage

plot_calibration_curve(analysis_object)

Arguments

analysis_object

Fitted analysis_object with 'fine_tuning()'.

Value

analysis_object

Examples

# Note: For obtaining the calibration curve plot the user needs to
# complete till fine_tuning( ) function of the MLwrap pipeline and
# only with binary outcome.



wrap_object <- preprocessing(df = sim_data,
                             formula = psych_well_bin ~ depression + emot_intel + resilience,
                             task = "classification")
wrap_object <- build_model(wrap_object, "Random Forest")
wrap_object <- fine_tuning(wrap_object, "Bayesian Optimization")

# And then, you can obtain the calibration curve plot.

plot_calibration_curve(wrap_object)




MLwrap documentation built on Aug. 8, 2025, 6:43 p.m.