Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot.predict_diagnostics

Plot Instance Level Residual Diagnostics


Description

Plot Instance Level Residual Diagnostics

Usage

## S3 method for class 'predict_diagnostics'
plot(x, ...)

Arguments

x

an object with instance level residual diagnostics created with predict_diagnostics function

...

other parameters that will be passed to plot.ceteris_paribus_explaine.

Value

an ggplot2 object of the class gg.

Examples

library("ranger")
titanic_glm_model <- ranger(survived ~ gender + age + class + fare + sibsp + parch,
                     data = titanic_imputed)
explainer_glm <- explain(titanic_glm_model,
                         data = titanic_imputed,
                         y = titanic_imputed$survived)
johny_d <- titanic_imputed[24, c("gender", "age", "class", "fare", "sibsp", "parch")]


pl <- predict_diagnostics(explainer_glm, johny_d, variables = NULL)
plot(pl)

pl <- predict_diagnostics(explainer_glm, johny_d,
                       neighbors = 10,
                       variables = c("age", "fare"))
plot(pl)

pl <- predict_diagnostics(explainer_glm,
                       johny_d,
                       neighbors = 10,
                       variables = c("class", "gender"))
plot(pl)

DALEX

moDel Agnostic Language for Exploration and eXplanation

v2.2.0
GPL
Authors
Przemyslaw Biecek [aut, cre] (<https://orcid.org/0000-0001-8423-1823>), Szymon Maksymiuk [aut] (<https://orcid.org/0000-0002-3120-1601>), Hubert Baniecki [aut] (<https://orcid.org/0000-0001-6661-5364>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.