vt.tree {aVirtualTwins} | R Documentation |
Trees to find Subgroups
Description
vt.tree
is a wrapper of VT.tree.class
and
VT.tree.reg
. With parameter tree.type, any of these two class
can be used with its own parameter.
Usage
vt.tree(tree.type = "class", vt.difft, sens = ">", threshold = seq(0.5,
0.8, 0.1), screening = NULL, ...)
Arguments
tree.type |
must be a character. "class" for classification tree, "reg" for regression tree. |
vt.difft |
|
sens |
must be a character c(">","<"). See |
threshold |
must be numeric. It can be a unique value or a vector. If
numeric vector, a list is returned. See |
screening |
must be logical. If TRUE, only varimp variables of VT.object is used to create the tree. |
... |
rpart() function parameters. Can be used for any tree.type. |
Details
See VT.tree
, VT.tree.class
and
VT.tree.reg
classes.
Value
VT.tree
or a list of VT.tree
depending on threshold
dimension. See examples.
Examples
data(sepsis)
vt.o <- vt.data(sepsis, "survival", "THERAPY", T)
# inside model :
vt.f <- vt.forest("one", vt.o)
# use classification tree
vt.tr <- vt.tree("class", vt.f, threshold = c(0.01, 0.05))
# return a list
class(vt.tr)
# access one of the tree
tree1 <- vt.tr$tree1
# return infos
# vt.tr$tree1$getInfos()
# vt.tr$tree1$getRules()
# use vt.subgroups tool:
subgroups <- vt.subgroups(vt.tr)
[Package aVirtualTwins version 1.0.1 Index]