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

error in the example #1

Closed
pbiecek opened this issue Jul 24, 2019 · 2 comments
Closed

error in the example #1

pbiecek opened this issue Jul 24, 2019 · 2 comments
Labels
bug 💣 Bug to fix

Comments

@pbiecek
Copy link
Member

pbiecek commented Jul 24, 2019

I was trying to execute an example for modelStudio

library("dime")
library("DALEX")

titanic <- na.omit(titanic)
set.seed(1313)
titanic_small <- titanic[sample(1:nrow(titanic), 500), c(1,2,3,6,7,9)]

model_titanic_glm <- glm(survived == "yes" ~ gender + age + fare + class + sibsp,
                         data = titanic_small, family = "binomial")

explain_titanic_glm <- explain(model_titanic_glm,
                               data = titanic_small[,-6],
                               y = titanic_small$survived == "yes",
                               label = "glm")

new_observation <- titanic_small[1:10,-6]

modelStudio(explain_titanic_glm, new_observation[1,])

but this ends with

> modelStudio(explain_titanic_glm, new_observation[1,])
  |                                                                        |   0%Error in ceteris_paribus.default(x, data, predict_function = predict_function,  : 
  promise already under evaluation: recursive default argument reference or earlier problems?

Enter a frame number, or 0 to exit   

1: modelStudio(explain_titanic_glm, new_observation[1, ])
2: modelStudio.explainer(explain_titanic_glm, new_observation[1, ])
3: modelStudio.default(x = x$model, new_observation = new_observation, facet_dim
4: ingredients::accumulated_dependency(x, data, predict_function, only_numerical
5: accumulated_dependency.R#51: accumulated_dependency.default(x, data, predict_
6: accumulated_dependency.R#91: ceteris_paribus.default(x, data, predict_functio

@hbaniecki
Copy link
Member

hbaniecki commented Jul 24, 2019

This error came from ingredients package. It should be fixed now. You can download the newest version from github: devtools::install_github("ModelOriented/ingredients").

@pbiecek
Copy link
Member Author

pbiecek commented Jul 24, 2019

Thanks, this helped

@pbiecek pbiecek closed this as completed Jul 24, 2019
@hbaniecki hbaniecki added the bug 💣 Bug to fix label Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 💣 Bug to fix
Projects
None yet
Development

No branches or pull requests

2 participants