How to change the colour of pdp and/or ice plots from the iml package in R?
问题 Below is some sample code to produce a pdp + ice plot for the Boston data using the iml package: library("randomForest") library("iml") library("MASS") library("ggplot2") data("Boston") rf <- randomForest(medv ~ ., data = Boston, ntree = 50) # create random forest mod <- Predictor$new(rf, data = Boston). # get predictions from iml eff <- FeatureEffect$new(mod, feature = "rm", method = "pdp+ice",grid.size = 30 ) #Create plot: plot(eff) + # Adds original predictions geom_point(data = Boston,