ModelOriented / iBreakDown

Break Down with interactions for local explanations (SHAP, BreakDown, iBreakDown)
https://ModelOriented.github.io/iBreakDown/
GNU General Public License v3.0
82 stars 15 forks source link

Significant number rounding doesn't seem right #61

Closed hbaniecki closed 4 years ago

hbaniecki commented 5 years ago
library("DALEX")
library("randomForest")
apartments_rf_model <- randomForest(m2.price ~ construction.year + surface + floor +
                                      no.rooms, data = apartments)
explainer_rf <- explain(apartments_rf_model,
                        data = apartments_test[,2:5],
                        y = apartments_test$m2.price)

iBreakDown::break_down(explainer_rf, new_observation = apartments_test[1,2:5])
apartments_test[1,2:5]

This example shows wrong observation values in break_down object.

https://github.com/ModelOriented/iBreakDown/blob/0e9150783817e4a52116e4912d7697689bc043b3/R/local_attributions.R#L307

This formatting could be done in print and plot functions (if really needed), not in local_attributions (and probably round instead of signif).

pbiecek commented 4 years ago

Thanks!