Plot the SDTree.
# S3 method for class 'SDTree'
plot(x, main = "", digits = 2, digits_decisions = 2, weighted = TRUE, ...)Fitted object of class SDTree.
title for the tree
integer indicating the number of decimal places to round() the leaf values to
integer indicating the number of decimal places to round() the splitting rule to.
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.
A ggplot object
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)