plot | R Documentation |
'Plot the error rates or MSE of a randomForest object'
(Quoted statements are from
randomForest
by Liaw and Wiener unless otherwise mentioned.)
## S3 method for class 'icrf' plot(x, type = "l", main = deparse(substitute(x)), oob = FALSE, ...)
x |
an object of |
type |
'type of plot.' |
main |
'main title of the plot.' |
oob |
Whether the out-of-bag error should be returned? |
... |
'other graphical parameters.' |
The IMSE (integrated mean squared error) of the icrf
object
is invisibly returned. 'If the object has a non-null test component, then the returned
object is a matrix where the first' (two) column is the IMSE measure (types 1 and 2), 'and
the second column is for the test set.'
The rows represent the forest iterations.
'If the x
has a non-null test
component, then the test set errors are
also plotted.'
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) samp <- sample(1:dim(rat2)[1], 200) rats.train <- rat2[samp, ] rats.test <- rat2[-samp, ] # Note that this is a toy example. Use a larger ntree and nfold in practice. set.seed(2) rats.icrf.small <- icrf(~ dose.lvl + weight + male + cage.no, data = rat2, data.type = "currentstatus", currentstatus.label = c("survtime", "tumor"), returnBest = TRUE, ntree=10, nfold=3) plot(rats.icrf.small)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.