giuseppec / iml

iml: interpretable machine learning R package
https://giuseppec.github.io/iml/
Other
489 stars 88 forks source link

Error: ! [conflicted] col_factor found in 2 packages #211

Closed Yingjie4Science closed 2 months ago

Yingjie4Science commented 5 months ago

effect = iml::FeatureEffects$new(model, method = 'pdp') ## 'ale', 'pdp', 'ice', 'pdp+ice' Error: ! [conflicted] col_factor found in 2 packages. Either pick the one you want with ::: • scales::col_factor • readr::col_factor Or declare a preference with conflicts_prefer(): • conflicts_prefer(scales::col_factor) • conflicts_prefer(readr::col_factor) Backtrace:

  1. iml::FeatureEffects$new(model, method = "pdp")
    1. conflicted (local) <fn>()
giuseppec commented 2 months ago

Do you have a minimal example? The iml package does not use any function called col_factor. It might be that you did not correctly pass a predict.function when you defined the iml::Predictor?

Closing for now, please reopen with a minimal working example code where you define the model.