# NOT RUN {
library("DALEX")
data(apartments)
library("randomForest")
apartments_rf_model <- randomForest(m2.price ~ construction.year + surface +
floor + no.rooms, data = apartments)
explainer_rf <- explain(apartments_rf_model, data = apartmentsTest[,2:5],
y = apartmentsTest$m2.price)
profiles <- model_profile(explainer_rf)
library("vivo")
measure <- global_variable_importance(profiles)
plot(measure)
# }
Run the code above in your browser using DataLab