giuseppec / giuseppec/iml

Bug for FeatureEffects with method = "pdp" and categorical features

Open
#133 4 comments 1 reaction 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.