Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

autoplot

Convenience function for more in-depth diagnostic plots of caretEnsemble objects


Description

This function provides a more robust series of diagnostic plots for a caretEnsemble object.

Usage

autoplot(object, which = c(1:6), mfrow = c(3, 2), xvars = NULL, ...)

Arguments

object

a caretEnsemble object

which

an integer index for which of the plots to print. DOES NOTHING.

mfrow

an integer vector of length 2 specifying the number of rows and columns for plots

xvars

a vector of the names of x variables to plot against residuals

...

additional arguments to pass to autoplot

Value

A grid of diagnostic plots. Top left is the range of the performance metric across each component model along with its standard deviation. Top right is the residuals from the ensembled model plotted against fitted values. Middle left is a bar graph of the weights of the component models. Middle right is the disagreement in the residuals of the component models (unweighted) across the fitted values. Bottom left and bottom right are the plots of the residuals against two random or user specified variables.

Examples

## Not run: 
set.seed(42)
models <- caretList(
 iris[1:50,1:2],
 iris[1:50,3],
 trControl=trainControl(method="cv"),
 methodList=c("glm", "rpart"))
ens <- caretEnsemble(models)
autoplot(ens)

## End(Not run)

caretEnsemble

Ensembles of Caret Models

v2.0.1
MIT + file LICENSE
Authors
Zachary A. Deane-Mayer [aut, cre], Jared E. Knowles [aut]
Initial release
2019-12-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.