Plot the SDTree.

# S3 method for class 'SDTree'
plot(x, main = "", digits = 2, digits_decisions = 2, weighted = TRUE, ...)

Arguments

x

Fitted object of class SDTree.

main

title for the tree

digits

integer indicating the number of decimal places to round() the leaf values to

digits_decisions

integer indicating the number of decimal places to round() the splitting rule to.

weighted

if true, connections from parent to children is scaled with res_dloss, more important splits result in thicker lines.

...

Further arguments passed to or from other methods.

Value

A ggplot object

See also

SDTree set.seed(1) n <- 10 X <- matrix(rnorm(n * 5), nrow = n) y <- sign(X[, 1]) * 3 + rnorm(n) model <- SDTree(x = X, y = y, Q_type = 'no_deconfounding', cp = 0.5) plot(model)

Author

Markus Ulmer