plot.sgtree: Plot surrogate tree statistics

View source: R/xgrove.R

plot.sgtreeR 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 sgtree.

abs

Name of the measure to be plotted on the x-axis, either "trees", "rules", "upsilon" or "cor".

ord

Name of the measure to be plotted on the y-axis, either "trees", "rules", "upsilon" or "cor".

...

Further arguments passed to plot.

Value

No return value.

Author(s)

gero.szepannek@web.de

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)


xgrove documentation built on Sept. 23, 2024, 1:06 a.m.