Calculates Oscillations for Individual Variable Profiles

individual_variable_oscillations(x, sort = TRUE, ...)

Arguments

x

an individual variable profile explainer produced with the `individual_variable_profile()` function

sort

a logical value. If `TRUE` then rows are sorted along the oscillations

...

other arguments

Examples

library("DALEX2")
library("randomForest") set.seed(59) apartments_rf_model <- randomForest(m2.price ~ construction.year + surface + floor + no.rooms + district, data = apartments) explainer_rf <- explain(apartments_rf_model, data = apartments_test, y = apartments_test$m2.price) apartment <- apartments_test[1,] ivp_rf <- individual_variable_profile(explainer_rf, apartment) individual_variable_oscillations(ivp_rf)
#> _vname_ _ids_ oscillations #> 6 district 1001 1103.42482 #> 3 surface 1001 290.57755 #> 4 floor 1001 243.03520 #> 5 no.rooms 1001 143.53000 #> 2 construction.year 1001 52.17142 #> 1 m2.price 1001 0.00000