Description Usage Arguments Value Examples
View source: R/local_variable_importance.R
This function calculate local importance measure in eight variants. We obtain eight variants measure through the possible options of three parameters such as absolute_deviation
, point
and density
.
1 2 3 4 5 6 7 8 |
profiles |
|
data |
|
absolute_deviation |
logical parameter, if |
point |
logical parameter, if |
density |
logical parameter, if |
grid_points |
maximum number of points for profile calculations, the default values is 101, the same as in |
A data.frame
of the class local_variable_importance
.
It's a data.frame
with calculated local variable importance measure.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 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)
new_apartment <- data.frame(construction.year = 1998, surface = 88, floor = 2L, no.rooms = 3)
profiles <- predict_profile(explainer_rf, new_apartment)
library("vivo")
local_variable_importance(profiles, apartments[,2:5],
absolute_deviation = TRUE, point = TRUE, density = TRUE)
local_variable_importance(profiles, apartments[,2:5],
absolute_deviation = TRUE, point = TRUE, density = FALSE)
local_variable_importance(profiles, apartments[,2:5],
absolute_deviation = TRUE, point = FALSE, density = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.