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

[plot CP] auto change the color parameter to '_label_' with multiple models (more than 1 unique label) #123

Closed
hbaniecki opened this issue Jul 22, 2020 · 2 comments
Assignees

Comments

@hbaniecki
Copy link
Member

@hbaniecki hbaniecki commented Jul 22, 2020

pbiecek added a commit that referenced this issue Jul 28, 2020
@pbiecek
Copy link
Member

@pbiecek pbiecek commented Jul 28, 2020

tested with

library("DALEX")
library("ingredients")
library("randomForest")

model_titanic_rf <- randomForest(survived ~ gender + age + fare,
                        data = na.omit(titanic_imputed))
explain_titanic_rf <- explain(model_titanic_rf,
                              data = titanic_imputed[,-8],
                              y = titanic_imputed[,8],
                              verbose = FALSE)
model_titanic_glm <- glm(survived ~ gender + age + fare,
                         data = titanic_imputed, family = "binomial")

explain_titanic_glm <- explain(model_titanic_glm,
                               data = titanic_imputed[,-8],
                               y = titanic_imputed[,8],
                               verbose = FALSE)

cp1 <- ceteris_paribus(explain_titanic_rf, titanic_imputed[c(1,100),])
cp2 <- ceteris_paribus(explain_titanic_glm, titanic_imputed[c(1,100),])
plot(cp1, cp2)
plot(cp1)
@pbiecek pbiecek self-assigned this Jul 28, 2020
@pbiecek pbiecek added the fixed label Jul 28, 2020
@hbaniecki
Copy link
Member Author

@hbaniecki hbaniecki commented Jul 29, 2020

Thanks

@hbaniecki hbaniecki closed this Jul 29, 2020
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.

None yet
2 participants
You can’t perform that action at this time.