data(titanic_imputed, package = "DALEX")
# fit a model
model_glm <- glm(survived ~ ., family = binomial, data = titanic_imputed)
# use DALEX package to wrap up a model into explainer
glm_audit <- audit(model_glm,
data = titanic_imputed,
y = titanic_imputed$survived)
# validate a model with auditor
mc <- model_cooksdistance(glm_audit)
mc
plot(mc)
Run the code above in your browser using DataLab