plot_residual_boxplot: Plot Boxplots of Residuals

View source: R/plot_residual_boxplot.R

plot_residual_boxplotR Documentation

Plot Boxplots of Residuals

Description

A boxplot of residuals.

Usage

plot_residual_boxplot(object, ...)

plotResidualBoxplot(object, ...)

Arguments

object

An object of class auditor_model_residual created with model_residual function.

...

Other auditor_model_residual objects to be plotted together.

Value

A ggplot object.

See Also

plot_residual

Examples

dragons <- DALEX::dragons[1:100, ]

# fit a model
model_lm <- lm(life_length ~ ., data = dragons)

lm_audit <- audit(model_lm, data = dragons, y = dragons$life_length)

# validate a model with auditor
mr_lm <- model_residual(lm_audit)

# plot results
plot_residual_boxplot(mr_lm)
plot(mr_lm, type = "residual_boxplot")

library(randomForest)
model_rf <- randomForest(life_length~., data = dragons)
rf_audit <- audit(model_rf, data = dragons, y = dragons$life_length)
mr_rf <- model_residual(rf_audit)
plot_residual_boxplot(mr_lm, mr_rf)
plot(mr_lm, mr_rf)


auditor documentation built on Nov. 2, 2023, 6:13 p.m.