library("DALEX")
library("modelStudio")
# fit a model
model_apartments <- glm(m2.price ~. , data = apartments)
# create an explainer for the model
explainer_apartments <- explain(model_apartments,
data = apartments,
y = apartments$m2.price)
# pick observations
new_observation <- apartments[1:2,]
rownames(new_observation) <- c("ap1","ap2")
# modify default options
new_options <- ms_options(
show_subtitle = TRUE,
bd_subtitle = "Hello World",
line_size = 5,
point_size = 9,
line_color = "pink",
point_color = "purple",
bd_positive_color = "yellow",
bd_negative_color = "orange"
)
# make a studio for the model
modelStudio(explainer_apartments,
new_observation,
options = new_options,
N = 200, B = 5) # faster example
Run the code above in your browser using DataLab