Print contents of the SDTree.

# S3 method for class 'SDTree'
print(x, ...)

Arguments

x

Fitted object of class SDTree.

...

Further arguments passed to or from other methods.

Value

No return value, called for side effects

See also

Author

Markus Ulmer

Examples


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)
print(model)
#>   levelName      value         s  j      label decision n_samples
#> 1     1      0.7434569 0.2565755  1 X1 <= 0.26                 10
#> 2      ¦--1 -1.4054911        NA NA       -1.4      yes         5
#> 3      °--2  2.8924048        NA NA        2.9       no         5