我想在R中使用SHAP。为此,我使用了reticulate
包。
library(reticulate)
library(randomForest)
py_install("shap")
shap = import("shap")
rf = randomForest(Species~., data = iris)
explnr = shap$TreeExplainer(rf)
Error in py_call_impl(callable, dots$args, dots$keywords) : Evaluation error: Unable to convert R object to Python type.
我所有的包裹都是最新的。有想法吗?
sessioninfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17763)