plot.stacked_metrics | R Documentation |
Stacked metrics is like plot for chosen_metric
but with all unique metrics stacked on top of each other.
Metrics containing NA's will be dropped to enable fair comparison.
## S3 method for class 'stacked_metrics' plot(x, ...)
x |
|
... |
other plot parameters |
ggplot2
object
data("german") y_numeric <- as.numeric(german$Risk) - 1 lm_model <- glm(Risk ~ ., data = german, family = binomial(link = "logit") ) explainer_lm <- DALEX::explain(lm_model, data = german[, -1], y = y_numeric) fobject <- fairness_check(explainer_lm, protected = german$Sex, privileged = "male" ) sm <- stack_metrics(fobject) plot(sm) rf_model <- ranger::ranger(Risk ~ ., data = german, probability = TRUE, num.trees = 200 ) explainer_rf <- DALEX::explain(rf_model, data = german[, -1], y = y_numeric) fobject <- fairness_check(explainer_rf, fobject) sm <- stack_metrics(fobject) plot(sm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.