branches {vistla} | R Documentation |
Extract all branches of the Vistla tree
Description
Gives access to a list of all branches in the tree.
Usage
branches(x, suboptimal = FALSE)
## S3 method for class 'vistla'
as.data.frame(x, row.names = NULL, optional = FALSE, suboptimal = FALSE, ...)
Arguments
x |
vistla object. |
suboptimal |
if TRUE, sub-optimal branches are included. |
row.names |
passed to |
optional |
passed to |
... |
ignored. |
Value
A data frame collecting all branches traced by vistla.
Each row corresponds to a single branch, i.e., edge between feature pairs.
This way it is a triplet of original features, names of which are stored in a
,
b
and c
columns.
For instance, path
would be stored in three rows, for
=
,
and
.
The width of a path (minimal
value) between root and feature pair
is
stored in the
score
column.
depth
stores the path depth, starting from 1 for pairs directly connected to the root,
and increasing by one for each additional feature.
Final column, leaf
, is a logical path indicating whether the edge is a final segment
of the widest path between root and .
Note
Pruned trees (obtained with prune
and using targets
argument
in the vistla
call) have no suboptimal branches.