Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upmake pdp and cp work with NA in data #120
Comments
|
I've could not find a reproducible example, I've checked this with
|
|
I guess that after the fix it works library("DALEX")
library("ingredients")
library("randomForest")
model_titanic_glm <- randomForest(survived ~ gender + age + fare,
data = na.omit(titanic_imputed))
titanic_imputed[2:1000,2] = NA
explain_titanic_glm <- explain(model_titanic_glm,
data = titanic_imputed[,-8],
y = titanic_imputed[,8],
verbose = FALSE)
pdp_glm <- partial_dependence(explain_titanic_glm,
N = 25, variables = c("age", "fare","sibsp"))
#, variable_splits = list(age = seq(0,100,0.1), fare = c(0:100), sibsp=0:10))
plot(pdp_glm) |
|
thanks |
crossref ModelOriented/modelStudio#71