plot.sgtree | R Documentation |
Plot statistics of surrogate trees to analyze complexity vs. explanatory power.
## S3 method for class 'sgtree'
plot(x, abs = "rules", ord = "upsilon", ...)
x |
An object of class |
abs |
Name of the measure to be plotted on the x-axis, either |
ord |
Name of the measure to be plotted on the y-axis, either |
... |
Further arguments passed to |
No return value.
library(randomForest)
library(pdp)
data(boston)
set.seed(42)
rf <- randomForest(cmedv ~ ., data = boston)
data <- boston[,-3] # remove target variable
ntrees <- c(4,8,16,32,64,128)
xg <- xgrove(rf, data, ntrees)
xg
plot(xg)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.