View source: R/treesize.icrf.R
| treesize.icrf | R Documentation |
icrf ensemble'Size of trees (number of nodes)' in the returned forest of icrf.
The returned forest depends on the returnBest argument of the icrf function;
It is either the last forest, when returnBest = FALSE or
the the best forest, when returnBest = TRUE.
(Quoted statements are from
randomForest by Liaw and Wiener unless otherwise mentioned.)
treesize(x, ...) ## S3 method for class 'icrf' treesize(x, terminal = TRUE, ...)
x |
an object of class |
... |
'not used.' |
terminal |
'count terminal nodes only ( |
'A vector containing number of nodes for the trees' in the icrf object.
The icrf 'object must contain the forest component; i.e.,
created with' icrf(..., keep.forest=TRUE).
Hunyong Cho, Nicholas P. Jewell, and Michael R. Kosorok.
Cho H., Jewell N. J., and Kosorok M. R. (2020+). "Interval censored recursive forests"
# rats data example.
# Note that this is a toy example. Use a larger ntree and nfold in practice.
data(rat2)
set.seed(1)
rats.icrf <-
icrf(~ dose.lvl + weight + male + cage.no, data = rat2,
data.type = "currentstatus", currentstatus.label = c("survtime", "tumor"),
returnBest = TRUE, ntree=10, nfold=3)
treesize(rats.icrf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.