Prints Local Fit / Wangkardu Summary

# S3 method for local_fit_explainer
print(x, ...)

Arguments

x

a local fit explainer produced with the 'local_fit' function

...

other arguments that will be passed to 'head' function

Examples

library("DALEX")
library("randomForest") apartments_rf_model <- randomForest(m2.price ~ construction.year + surface + floor + no.rooms + district, data = apartments) explainer_rf <- explain(apartments_rf_model, data = apartmentsTest[,2:6], y = apartmentsTest$m2.price) new_apartment <- apartmentsTest[1, ] new_apartment
#> m2.price construction.year surface floor no.rooms district #> 1001 4644 1976 131 3 5 Srodmiescie
cr_rf <- local_fit(explainer_rf, observation = new_apartment, select_points = 0.002, selected_variable = "surface") cr_rf
#> y_hat new_x vname quant obs_id label #> 1001 4736.864 20 surface 0.00 0 randomForest #> 1001.1 4729.518 21 surface 0.01 0 randomForest #> 1001.2 4730.079 23 surface 0.02 0 randomForest #> 1001.3 4725.593 24 surface 0.03 0 randomForest #> 1001.4 4725.606 26 surface 0.04 0 randomForest #> 1001.5 4718.965 27 surface 0.05 0 randomForest