| autoplot.gg | R Documentation |
autoplot methods for ggRandomForests data objectsThese let you call ggplot2::autoplot() on any gg_* object
ggRandomForests returns. Each is a thin wrapper around the matching
plot.gg_*() S3 method, and ... passes straight through, so
every argument those plot methods take is still available here.
## S3 method for class 'gg_error'
autoplot(object, ...)
## S3 method for class 'gg_vimp'
autoplot(object, ...)
## S3 method for class 'gg_rfsrc'
autoplot(object, ...)
## S3 method for class 'gg_variable'
autoplot(object, ...)
## S3 method for class 'gg_partial'
autoplot(object, ...)
## S3 method for class 'gg_partial_rfsrc'
autoplot(object, ...)
## S3 method for class 'gg_partialpro'
autoplot(object, ...)
## S3 method for class 'gg_partial_varpro'
autoplot(object, ...)
## S3 method for class 'gg_roc'
autoplot(object, ...)
## S3 method for class 'gg_survival'
autoplot(object, ...)
## S3 method for class 'gg_brier'
autoplot(object, ...)
## S3 method for class 'gg_varpro'
autoplot(object, ...)
## S3 method for class 'gg_udependent'
autoplot(object, ...)
## S3 method for class 'gg_isopro'
autoplot(object, ...)
object |
A |
... |
Additional arguments passed to the underlying
|
The following gg_* classes are supported:
gg_errorOOB error vs. number of trees
gg_vimpVariable importance ranking
gg_rfsrcPredicted vs. observed values
gg_variableMarginal dependence
gg_partialPartial dependence (via plot.variable)
gg_partial_rfsrcPartial dependence (via partial.rfsrc)
gg_partial_varproPartial dependence (via varPro)
gg_partialproPartial dependence via varPro (deprecated alias)
gg_varproVariable importance from varPro
gg_rocROC curve
gg_survivalSurvival / cumulative hazard curves
gg_brierTime-resolved Brier score and CRPS
A ggplot object.
library(ggplot2)
set.seed(42)
rf <- randomForestSRC::rfsrc(Ozone ~ ., data = na.omit(airquality),
ntree = 50, importance = TRUE,
tree.err = TRUE)
autoplot(gg_error(rf))
autoplot(gg_vimp(rf))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.