Description Usage Arguments Details Value
View source: R/tidytree-funs.R
Creates a tbl_tree
grouped by iteration (iter
) and tree id (tree_id
).
See Details below.
1 | as_tidytree(model, extra_cols, label_digits = 2)
|
model |
BART model. |
extra_cols |
Extra columns to be included. |
label_digits |
Rounding for labels. |
List of potential columns returned:
Integer describing unique MCMC iteration.
Integer. Unique tree id with each iter
.
Integer describing node in tree. Unique to each tree
-iter
.
Integer describing parent node in tree.
Label for the node.
Position in tree hierarchy.
Variable for split.
Numeric. Value of decision rule for var
.
Logical. TRUE
if leaf, FALSE
if stem.
Numeric (mean function) value of leaf
Integer. Left child of node.
Integer. Right child of node.
A tibble with required columns for tbl_tree
:
node
, parent
, label
.
And columns iter
, tree_id
are used to differentiate trees and
iterations and are always included. Remaining columns are optional (see
details).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.