# 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[1:300 ,],
formula = psych_well_bin ~ depression + resilience,
task = "classification")
wrap_object <- build_model(wrap_object, "Random Forest",
hyperparameters = list(mtry = 2, trees = 5))
set.seed(123) # For reproducibility
wrap_object <- fine_tuning(wrap_object, "Grid Search CV")
# And then, you can obtain the calibration curve plot.
plot_calibration_curve(wrap_object)
Run the code above in your browser using DataLab