1% Generated by roxygen2: do not edit by hand 2% Please edit documentation in R/resamples.R 3\name{xyplot.resamples} 4\alias{xyplot.resamples} 5\alias{densityplot.resamples} 6\alias{bwplot.resamples} 7\alias{splom.resamples} 8\alias{parallelplot.resamples} 9\alias{dotplot.resamples} 10\alias{ggplot.resamples} 11\title{Lattice Functions for Visualizing Resampling Results} 12\usage{ 13\method{xyplot}{resamples}( 14 x, 15 data = NULL, 16 what = "scatter", 17 models = NULL, 18 metric = x$metric[1], 19 units = "min", 20 ... 21) 22 23\method{parallelplot}{resamples}(x, data = NULL, models = x$models, metric = x$metric[1], ...) 24 25\method{splom}{resamples}( 26 x, 27 data = NULL, 28 variables = "models", 29 models = x$models, 30 metric = NULL, 31 panelRange = NULL, 32 ... 33) 34 35\method{densityplot}{resamples}(x, data = NULL, models = x$models, metric = x$metric, ...) 36 37\method{bwplot}{resamples}(x, data = NULL, models = x$models, metric = x$metric, ...) 38 39\method{dotplot}{resamples}( 40 x, 41 data = NULL, 42 models = x$models, 43 metric = x$metric, 44 conf.level = 0.95, 45 ... 46) 47 48\method{ggplot}{resamples}( 49 data = NULL, 50 mapping = NULL, 51 environment = NULL, 52 models = data$models, 53 metric = data$metric[1], 54 conf.level = 0.95, 55 ... 56) 57} 58\arguments{ 59\item{x}{an object generated by \code{resamples}} 60 61\item{data}{Only used for the \code{ggplot} method; an object generated by 62\code{resamples}} 63 64\item{what}{for \code{xyplot}, the type of plot. Valid options are: 65"scatter" (for a plot of the resampled results between two models), 66"BlandAltman" (a Bland-Altman, aka MA plot between two models), "tTime" (for 67the total time to run \code{train} versus the metric), "mTime" (for the time 68to build the final model) or "pTime" (the time to predict samples - see the 69\code{timingSamps} options in \code{\link{trainControl}}, 70\code{\link{rfeControl}}, or \code{\link{sbfControl}})} 71 72\item{models}{a character string for which models to plot. Note: 73\code{xyplot} requires one or two models whereas the other methods can plot 74more than two.} 75 76\item{metric}{a character string for which metrics to use as conditioning 77variables in the plot. \code{splom} requires exactly one metric when 78\code{variables = "models"} and at least two when \code{variables = 79"metrics"}.} 80 81\item{units}{either "sec", "min" or "hour"; which \code{what} is either 82"tTime", "mTime" or "pTime", how should the timings be scaled?} 83 84\item{\dots}{further arguments to pass to either 85\code{\link[lattice:histogram]{histogram}}, 86\code{\link[lattice:histogram]{densityplot}}, 87\code{\link[lattice:xyplot]{xyplot}}, \code{\link[lattice:xyplot]{dotplot}} 88or \code{\link[lattice:splom]{splom}}} 89 90\item{variables}{either "models" or "metrics"; which variable should be 91treated as the scatter plot variables?} 92 93\item{panelRange}{a common range for the panels. If \code{NULL}, the panel 94ranges are derived from the values across all the models} 95 96\item{conf.level}{the confidence level for intervals about the mean 97(obtained using \code{\link[stats]{t.test}})} 98 99\item{mapping, environment}{Not used.} 100} 101\value{ 102a lattice object 103} 104\description{ 105Lattice and ggplot functions for visualizing resampling results across models 106} 107\details{ 108The ideas and methods here are based on Hothorn et al. (2005) and Eugster et 109al. (2008). 110 111\code{dotplot} and \code{ggplot} plots the average performance value (with two-sided 112confidence limits) for each model and metric. 113 114\code{densityplot} and \code{bwplot} display univariate visualizations of 115the resampling distributions while \code{splom} shows the pair-wise 116relationships. 117} 118\examples{ 119 120\dontrun{ 121#load(url("http://topepo.github.io/caret/exampleModels.RData")) 122 123resamps <- resamples(list(CART = rpartFit, 124 CondInfTree = ctreeFit, 125 MARS = earthFit)) 126 127dotplot(resamps, 128 scales =list(x = list(relation = "free")), 129 between = list(x = 2)) 130 131bwplot(resamps, 132 metric = "RMSE") 133 134densityplot(resamps, 135 auto.key = list(columns = 3), 136 pch = "|") 137 138xyplot(resamps, 139 models = c("CART", "MARS"), 140 metric = "RMSE") 141 142splom(resamps, metric = "RMSE") 143splom(resamps, variables = "metrics") 144 145parallelplot(resamps, metric = "RMSE") 146 147 148} 149 150} 151\references{ 152Hothorn et al. The design and analysis of benchmark experiments. 153Journal of Computational and Graphical Statistics (2005) vol. 14 (3) pp. 154675-699 155 156Eugster et al. Exploratory and inferential analysis of benchmark 157experiments. Ludwigs-Maximilians-Universitat Munchen, Department of 158Statistics, Tech. Rep (2008) vol. 30 159} 160\seealso{ 161\code{\link{resamples}}, \code{\link[lattice:xyplot]{dotplot}}, 162\code{\link[lattice:bwplot]{bwplot}}, 163\code{\link[lattice:histogram]{densityplot}}, 164\code{\link[lattice:xyplot]{xyplot}}, \code{\link[lattice:splom]{splom}} 165} 166\author{ 167Max Kuhn 168} 169\keyword{hplot} 170