fromList.SDTree {SDModels} | R Documentation |
SDTree fromList method
Description
Converts the tree in an SDTree object from
class list
to class Node
(Glur 2023).
Usage
## S3 method for class 'SDTree'
fromList(object, ...)
Arguments
object |
an SDTree object with the tree in list format |
... |
Further arguments passed to or from other methods. |
Value
an SDTree object with the tree in Node format
Author(s)
Markus Ulmer
References
Glur C (2023). “data.tree: General Purpose Hierarchical Data Structure.” https://CRAN.R-project.org/package=data.tree.
See Also
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)
fromList(toList(model))
[Package SDModels version 1.0.13 Index]