plot.model_profile {DALEX} | R Documentation |
Plot Dataset Level Model Profile Explanations
Description
Plot Dataset Level Model Profile Explanations
Usage
## S3 method for class 'model_profile'
plot(x, ..., geom = "aggregates")
Arguments
x |
a variable profile explanation, created with the |
... |
other parameters |
geom |
either |
Value
An object of the class ggplot
.
aggregates
color
a character. Either name of a color, or hex code for a color, or_label_
if models shall be colored, or_ids_
if instances shall be coloredsize
a numeric. Size of lines to be plottedalpha
a numeric between0
and1
. Opacity of linesfacet_ncol
number of columns for thefacet_wrap
variables
if notNULL
then onlyvariables
will be presentedtitle
a character. Partial and accumulated dependence explainers have deafult value.subtitle
a character. IfNULL
value will be dependent on model usage.
Examples
titanic_glm_model <- glm(survived~., data = titanic_imputed, family = "binomial")
explainer_glm <- explain(titanic_glm_model, data = titanic_imputed)
expl_glm <- model_profile(explainer_glm, "fare")
plot(expl_glm)
library("ranger")
titanic_ranger_model <- ranger(survived~., data = titanic_imputed, num.trees = 50,
probability = TRUE)
explainer_ranger <- explain(titanic_ranger_model, data = titanic_imputed)
expl_ranger <- model_profile(explainer_ranger)
plot(expl_ranger)
plot(expl_ranger, geom = "aggregates")
vp_ra <- model_profile(explainer_ranger, type = "partial", variables = c("age", "fare"))
plot(vp_ra, variables = c("age", "fare"), geom = "points")
vp_ra <- model_profile(explainer_ranger, type = "partial", k = 3)
plot(vp_ra)
plot(vp_ra, geom = "profiles")
plot(vp_ra, geom = "points")
vp_ra <- model_profile(explainer_ranger, type = "partial", groups = "gender")
plot(vp_ra)
plot(vp_ra, geom = "profiles")
plot(vp_ra, geom = "points")
vp_ra <- model_profile(explainer_ranger, type = "accumulated")
plot(vp_ra)
plot(vp_ra, geom = "profiles")
plot(vp_ra, geom = "points")
[Package DALEX version 2.4.3 Index]