dx_plot_probabilities | R Documentation |
Generates a plot showing the distribution of predicted probabilities. Offers options to show as a histogram or density plot.
dx_plot_probabilities(
dx_obj,
plot_type = "histogram",
bins = NULL,
fill_color = "#0057B8"
)
dx_obj |
A |
plot_type |
Character string specifying the type of plot: "histogram" or "density". |
bins |
Optional; number of bins for the histogram (relevant if plot_type = "histogram"). |
fill_color |
Color to fill the bars or density plot. |
A ggplot object representing the distribution of predicted probabilities.
dx_obj <- dx(
data = dx_heart_failure,
true_varname = "truth",
pred_varname = "predicted",
outcome_label = "Heart Attack",
setthreshold = .3
)
dx_plot_probabilities(dx_obj, plot_type = "histogram", bins = 30)
dx_plot_probabilities(dx_obj, plot_type = "density")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.