R/global_variable_importance.R
global_variable_importance.Rd
This function calculate global importance measure.
global_variable_importance(profiles)
profiles |
|
---|
A data.frame
of the class global_variable_importance
.
It's a data.frame
with calculated global variable importance measure.
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)#> Preparation of a new explainer is initiated #> -> model label : randomForest ( default ) #> -> data : 9000 rows 4 cols #> -> target variable : 9000 values #> -> predict function : yhat.randomForest will be used ( default ) #> -> predicted values : numerical, min = 2103.719 , mean = 3514.285 , max = 5364.833 #> -> model_info : package randomForest , ver. 4.6.14 , task regression ( default ) #> -> residual function : difference between y and yhat ( default ) #> -> residuals : numerical, min = -1252.104 , mean = -2.761149 , max = 2139.647 #> A new explainer has been created!#> variable_name measure _label_model_ #> 1 construction.year 159.3080 randomForest #> 2 surface 241.7430 randomForest #> 3 floor 185.6088 randomForest #> 4 no.rooms 185.7994 randomForest