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. Note that the ensemble
must have been trained with savePredictions = "final", which is required to
get residuals from the stack for the plot.
Arguments
object
a caretStack object
training_data
The data used to train the ensemble. Required if xvars is not NULL
Must be in the same row order as when the models were trained.
xvars
a vector of the names of x variables to plot against residuals
show_class_id
For classification only: which class level to show on the plot