Closed hbaniecki closed 3 years ago
E.g. centering depends on variables.
variables
library("DALEX") library("ranger") titanic_ranger_model <- ranger(survived~., data = titanic_imputed, num.trees = 50, probability = TRUE) explainer_ranger <- explain(titanic_ranger_model, data = titanic_imputed) mp1 <- model_profile(explainer_ranger, variables='sibsp', type='accumulated', N=3000) mean(mp1$cp_profiles$`_yhat_`, na.rm = TRUE) mean(mp1$agr_profiles$`_yhat_`, na.rm = TRUE) mp2 <- model_profile(explainer_ranger, type='accumulated', N=3000) mean(mp2$cp_profiles$`_yhat_`, na.rm = TRUE) mean(mp2$agr_profiles$`_yhat_`, na.rm = TRUE) plot(mp1) plot(mp2, variables='sibsp')
E.g. centering depends on
variables
.