plot.sgtree {xgrove} | R Documentation |
Plot surrogate tree statistics
Description
Plot statistics of surrogate trees to analyze complexity vs. explanatory power.
Usage
## S3 method for class 'sgtree'
plot(x, abs = "rules", ord = "upsilon", ...)
Arguments
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 |
Value
No return value.
Author(s)
Examples
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)
[Package xgrove version 0.1-7 Index]