Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use data y_hat mean centering in ale plot #126

Closed
hbaniecki opened this issue Aug 28, 2020 · 0 comments
Closed

Use data y_hat mean centering in ale plot #126

hbaniecki opened this issue Aug 28, 2020 · 0 comments
Assignees
Labels

Comments

@hbaniecki
Copy link
Member

@hbaniecki hbaniecki commented Aug 28, 2020

E.g. centering depends on 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')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

1 participant
You can’t perform that action at this time.