View source: R/ability_human_override.R
vis_diff_subgroup | R Documentation |
Internal function to visualize the difference in risk between human+AI and human decision makers, for a subgroup defined by AI recommendation.
vis_diff_subgroup(
df,
label.subgroup1 = "Subgroup 1",
label.subgroup2 = "Subgroup 2",
x.order = NULL,
p.title = NULL,
p.lb = -0.2,
p.ub = 0.2,
y.lab = "Impact of PSA",
p.label = c("Human correct", "PSA correct"),
metrics = c("Misclassification Rate", "False Negative Proportion",
"False Positive Proportion")
)
df |
A data frame generated by |
label.subgroup1 |
A label for subgroup1 (character). |
label.subgroup2 |
A label for subgroup2 (character). |
x.order |
An order for the x-axis (character vector). Default NULL. |
p.title |
A title for the plot (character). Default NULL. |
p.lb |
A lower bound for the y-axis (numeric). Default -0.2. |
p.ub |
An upper bound for the y-axis (numeric). Default 0.2. |
y.lab |
A label for the y-axis (character). Default "Impact of PSA". |
p.label |
A vector of two labels for the annotations (character). Default c("PSA harms", "PSA helps"). |
metrics |
A vector of metrics to include in the plot (character). Default c("Misclassification Rate", "False Negative Proportion", "False Positive Proportion"). |
A ggplot object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.