Bug for FeatureEffects with method = "pdp" and categorical features
Open
bug
- Dominant language
- R
- Stars
- 503
- Forks
- 87
- PR merge metrics
- No merged PRs in 30d
Description
Minimal Example (see comments for the bug)
```r
library("mlr3")
library("mlr3learners")
library("iml")
credit.task = tsk("german_credit")
lrn = lrn("classif.ranger", predict_type = "prob")
model = lrn$train(credit.task)
m = Predictor$new(model, data = credit.task$data(), y = "credit_risk")
# BUG for method = "pdp" for categorical features:
pdp = FeatureEffects$new(m, feature = c("status", "duration"), method = "pdp")
plot(pdp)
# this works:
pdp = FeatureEffect$new(m, feature = "status", method = "pdp")
plot(pdp)
# this also works:
pdp = FeatureEffects$new(m, feature = c("status", "duration"), method = "pdp+ice")
plot(pdp)
```
Contributor guide
Assessment
This issue has not been assessed yet.