
Last chance! 50% off unlimited learning
Sale ends in
randomForestSRC
error rate as a function of
number of trees.gg_error.ggRandomForests(object, ...)
randomForestSRC::rfsrc
object.gg_error
data.frame
with one column indicating the tree number,
and the remaining columns from the randomForestSRC::rfsrc$err.rate
return value.gg_error
function simply returns the
randomForestSRC::rfsrc$err.rate
object as a data.frame, and assigns the class
for connecting to the S3 plot.gg_error
function.Ishwaran H. and Kogalur U.B. (2007). Random survival forests for R, Rnews, 7(2):25-31.
Ishwaran H. and Kogalur U.B. (2013). Random Forests for Survival, Regression and Classification (RF-SRC), R package version 1.4.
plot.gg_error
rfsrc
plot.rfsrc
## Examples from RFSRC package...
## ------------------------------------------------------------
## classification example
## ------------------------------------------------------------
## You can build a randomForest
# rfsrc_iris <- rfsrc(Species ~ ., data = iris)
# ... or load a cached randomForestSRC object
data(rfsrc_iris, package="ggRandomForests")
# Get a data.frame containing error rates
gg_dta<- gg_error(rfsrc_iris)
# Plot the gg_error object
plot(gg_dta)
## ------------------------------------------------------------
## Regression example
## ------------------------------------------------------------
# rfsrc_airq <- rfsrc(Ozone ~ ., data = airquality, na.action = "na.impute")
# ... or load a cached randomForestSRC object
data(rfsrc_airq, package="ggRandomForests")
# Get a data.frame containing error rates
gg_dta<- gg_error(rfsrc_airq)
# Plot the gg_error object
plot(gg_dta)
## ------------------------------------------------------------
## Survival example
## ------------------------------------------------------------
## veteran data
## randomized trial of two treatment regimens for lung cancer
# data(veteran, package = "randomForestSRC")
# rfsrc_veteran <- rfsrc(Surv(time, status) ~ ., data = veteran, ntree = 100)
# Load a cached randomForestSRC object
data(rfsrc_veteran, package="ggRandomForests")
gg_dta <- gg_error(rfsrc_veteran)
plot(gg_dta)
Run the code above in your browser using DataLab