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
Labels
feature 💡 New feature or request fixed already fixed

Comments

@hbaniecki
Copy link
Member

hbaniecki commented Jul 22, 2020

from: ModelOriented/DALEX#236

@hbaniecki hbaniecki added the feature 💡 New feature or request label Jul 22, 2020
pbiecek added a commit that referenced this issue Jul 28, 2020
@pbiecek
Copy link
Member

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 already fixed label Jul 28, 2020
@hbaniecki
Copy link
Member Author

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 💡 New feature or request fixed already fixed
Projects
None yet
Development

No branches or pull requests

2 participants