print.fairness_regression_object | R Documentation |
Print Fairness Regression Object
## S3 method for class 'fairness_regression_object' print(x, ..., colorize = TRUE)
x |
|
... |
other parameters |
colorize |
logical, whether information about metrics should be in color or not |
set.seed(123) data <- data.frame( x = c(rnorm(500, 500, 100), rnorm(500, 400, 200)), pop = c(rep("A", 500), rep("B", 500)) ) data$y <- rnorm(length(data$x), 1.5 * data$x, 100) # create model model <- lm(y ~ ., data = data) # create explainer exp <- DALEX::explain(model, data = data, y = data$y) # create fobject fobject <- fairness_check_regression(exp, protected = data$pop, privileged = "A") # results fobject model_ranger <- ranger::ranger(y ~ ., data = data, seed = 123) exp2 <- DALEX::explain(model_ranger, data = data, y = data$y) fobject <- fairness_check_regression(exp2, fobject) # results fobject
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.