model_residual: Create Model Residuals Explanation

View source: R/model_residual.R

model_residualR Documentation

Create Model Residuals Explanation

Description

Creates auditor_model_residual that contains sorted residuals. An object can be further used to generate plots. For the list of possible plots see see also section.

Usage

model_residual(object, ...)

modelResiduals(object, ...)

Arguments

object

An object of class explainer created with function explain from the DALEX package.

...

other parameters

Value

An object of the class auditor_model_residual.

See Also

plot_acf, plot_autocorrelation, plot_residual, plot_residual_boxplot, plot_pca, plot_correlation, plot_prediction, plot_rec, plot_residual_density, plot_residual, plot_rroc, plot_scalelocation, plot_tsecdf

Examples

library(DALEX)

# fit a model
model_glm <- glm(m2.price ~ ., data = apartments)

glm_audit <- explain(model_glm,
                   data = apartments,
                   y = apartments$m2.price)

# validate a model with auditor
mr <- model_residual(glm_audit)
mr

plot(mr)


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