How to use the pdp in R to compute 3d partial dependence plots?

I have a Random forest model in R similar to this:

data("cars")
my_data<-cars[1:5]
my_rf <- randomForest( Price ~ ., data=my_data)
price_mil<- partial(my_rf, pred.var = c("Price", "Mileage"))
plotPartial(price_mil, levelplot = FALSE, zlab = "Price", colorkey = TRUE)

However, I would like to have some 3d partial dependence plots, including the values of parameters on the axis. How can I do this with pdp?



Read more here: https://stackoverflow.com/questions/66241781/how-to-use-the-pdp-in-r-to-compute-3d-partial-dependence-plots

Content Attribution

This content was originally published by geo_dd at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: