Create an interactive histogram of predicted probabilities, separated by observed outcome. The browser controls can show the distribution relative to either probability thresholds or predicted-positive classification rates (PPCR).
Arguments
- probs
a list of vectors of estimated probabilities (one for each model or one for each population)
- reals
a list of vectors of binary outcomes (one for each population)
- by
number: increment of the sequence.
- stratified_by
Performance Metrics can be stratified by Probability Threshold or alternatively by Predicted Positives Condition Rate
Value
A browsable HTML object rendered by the vendored rtichoke_viz
browser bundle. It can be displayed in the RStudio Viewer, embedded in
R Markdown or Quarto, or saved as a single self-contained HTML file with
htmltools::save_html().
Examples
create_probs_histogram(
probs = list(example_dat$estimated_probabilities),
reals = list(example_dat$outcome),
by = 0.1
)
create_probs_histogram(
probs = list(
"Prediction Model" = example_dat$estimated_probabilities,
"Random Guess" = example_dat$random_guess
),
reals = list(example_dat$outcome),
by = 0.1,
stratified_by = "ppcr"
)
