plot_density | R Documentation |
Plot distribution for models output probabilities. See how being in particular subgroup affects models decision.
plot_density(x, ...)
x |
object of class |
... |
other plot parameters |
ggplot2
object
data("compas") glm_compas <- glm(Two_yr_Recidivism ~ ., data = compas, family = binomial(link = "logit")) y_numeric <- as.numeric(compas$Two_yr_Recidivism) - 1 explainer_glm <- DALEX::explain(glm_compas, data = compas, y = y_numeric) fobject <- fairness_check(explainer_glm, protected = compas$Ethnicity, privileged = "Caucasian" ) plot_density(fobject)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.