check_residuals_trend: Checks for trend in residuals

View source: R/check_residuals.R

check_residuals_trendR Documentation

Checks for trend in residuals

Description

Calculates loess fit for residuals and then extracts statistics that shows how far is this fit from one without trend

Usage

check_residuals_trend(object, B = 20)

Arguments

object

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

B

number of samplings

Value

standardized loess fit for residuals

Examples

library(DALEX)
dragons <- DALEX::dragons[1:100, ]
lm_model <- lm(life_length ~ ., data = dragons)
lm_exp <- explain(lm_model, data = dragons, y = dragons$life_length)
library(auditor)
check_residuals_trend(lm_exp)

mi2-warsaw/auditor documentation built on Oct. 31, 2023, 1:28 a.m.