小编Rub*_*sen的帖子

How can I create a Partial Dependence plot for a categorical variable in R?

I am working with the r-package randomForest and have successfully made a random forest model and an importance plot. I am working with a dichotomous response and several categorical predictors.

However, I can't figure out how to make partial dependence plots for my categorical variables. I have tried using the randomForest command partialPLot. But I get the following error:

> partialPlot(rf.5, rf.train.1, religion)
Error in is.finite(x) : default method not implemented for type 'list'
Run Code Online (Sandbox Code Playgroud)

.

So my question is: Can …

plot r machine-learning random-forest categorical-data

5
推荐指数
1
解决办法
9027
查看次数