cal_plot_multi | R Documentation |
This code builds off of code written by Darren Dahly, PhD in this blog post: https://darrendahly.github.io/post/homr/.
cal_plot_multi(
df,
outcome,
prediction,
model,
n_bins = 10,
show_loess = FALSE,
plot_title = "",
...
)
df |
The df as a data.frame. |
outcome |
A character string containing the name of the column containing the outcomes (expressed as 0/1s). |
prediction |
A character string containing the name of the column containing the predictions. |
model |
A character string containing the name of the column containing the model names |
n_bins |
Number of bins. Defaults to 10. Set to 0 to hide binned calibration. |
show_loess |
Whether to show loess smoothed calibration estimates. Defaults to FALSE.
For |
plot_title |
A character string containing the title for the resulting plot. |
A ggplot containing the calibration plot
data(multi_model_dataset)
cal_plot_multi(multi_model_dataset, outcome = 'outcomes',model = 'model_name', prediction = 'predictions', n_bins = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.