Learn R Programming

caret (version 4.42)

xyplot.resamples: Lattice Functions for Visualizing Resampling Results

Description

Lattice functions for visualizing resampling results across models

Usage

## S3 method for class 'resamples':
xyplot(x, data = NULL, models = x$models[1:2], metric = x$metric[1], ...)
## S3 method for class 'resamples':
densityplot(x, data = NULL, models = x$models, metric = x$metric, ...)
## S3 method for class 'resamples':
bwplot(x, data = NULL, models = x$models, metric = x$metric, ...)
## S3 method for class 'resamples':
splom(x, data = NULL, models = x$models, metric = x$metric[1], ...)

Arguments

x
an object generated by resamples
data
Not used
models
a character string for which models to plot. Note: xyplot requires exactly two models whereas the other methods can plot more than two.
metric
a character string for which metrics to use as conditioning variables in the plot. splom requires exactly one metric and does not condition.
...
further arguments to pass to either histogram, densityplot, xyplot

Value

  • a lattice object

Details

xyplot only uses two models in the plot. The plot uses difference of the models on the y-axis and the average of the models on the x-axis.

densityplot and bwplot display univariate visualizations of the resampling distributions while splom shows the pair-wise relationships.

See Also

resamples, bwplot, densityplot, xyplot, splom

Examples

Run this code
#load(url("http://caret.r-forge.r-project.org/Classification_and_Regression_Training_files/exampleModels.RData"))

resamps <- resamples(list(CART = rpartFit,
                          CondInfTree = ctreeFit,
                          MARS = earthFit))
bwplot(resamps,
       metric = "RMSE")

densityplot(resamps,
            auto.key = list(columns = 3),
            pch = "|")

xyplot(resamps,
       models = c("CART", "MARS"),
       metric = "RMSE")

splom(resamps, metric = "RMSE")

Run the code above in your browser using DataLab