Description Usage Arguments Value Examples
Builds an entire PFA list of lists based on a single gbm model tree
1 2 | ## S3 method for class 'gbm'
build_model(object, which_tree = 1, ...)
|
object |
a object of class gbm |
which_tree |
an integer indicating which single tree to build |
... |
further arguments passed to or from other methods |
a list
of lists representation of the tree that can be
inserted into a cell or pool
1 2 3 4 5 6 7 8 | dat <- data.frame(X1 = runif(100),
X2 = rnorm(100))
dat$Y <- ((rexp(100,5) + 5 * dat$X1 - 4 * dat$X2) > 0)
bernoulli_model <- gbm::gbm(Y ~ X1 + X2,
data = dat,
distribution = 'bernoulli')
my_tree <- build_model(bernoulli_model, 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.