Code snippets

  1. Construct the explainer for the model
library("randomForest")
library("DALEX")
explain_rf <- DALEX::explain(model = titanic_rf,  
                             data = titanic_imputed[, -9],
                             y = titanic_imputed$survived == "yes", 
                             label = "New Random Forest")
predict(explain_rf, henry)
## [1] 0.246