make_tree | R Documentation |
Build a depth depth
tree by drawing random split variables
and split values from the Nxp matrix X
. In leaf nodes a random
action is drawn from 1:d
. (Minimum leaf size will be 1)
make_tree(X, depth, d)
X |
data matrix. |
depth |
tree depth. |
d |
number of actions. |
A policy_tree tree object
## Not run:
depth <- 2
n <- 100
p <- 10
d <- 3
X <- matrix(rnorm(n * p), n, p)
Y <- matrix(rnorm(n * d), n, d)
tree <- make_tree(X, depth = depth, d = d)
pp <- predict_test_tree(tree, X)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.