Closed OliverFishCode closed 5 years ago
I'm not sure adding it as an option to the function is a general use case. However since plot_predict_interaction
returns a ggplot object, you can update the labels on top of it:
library(randomForestExplainer)
library(randomForest)
library(ggplot2)
data(Boston, package = "MASS")
Boston$chas <- as.logical(Boston$chas)
set.seed(2017)
forest <- randomForest(medv ~ ., data = Boston, localImp = TRUE)
p <- plot_predict_interaction(forest, Boston, "rm", "lstat")
p + labs("my custom x lab", "my custom y lab")
Closing because an example has been provided above to modify labels post figure generation.
It would be nice to be able to change x and y labels like you can with the title