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

resampleHist

Plot the resampling distribution of the model statistics


Description

Create a lattice histogram or densityplot from the resampled outcomes from a train object.

Usage

resampleHist(object, type = "density", ...)

Arguments

object

an object resulting form a call to train

type

a character string. Either "hist" or "density"

...

options to pass to histogram or densityplot

Details

All the metrics from the object are plotted, but only for the final model. For more comprehensive plots functions, see histogram.train, densityplot.train, xyplot.train, stripplot.train.

For the plot to be made, the returnResamp argument in trainControl should be either "final" or "all".

Value

a object of class trellis

Author(s)

Max Kuhn

See Also

Examples

## Not run: 
data(iris)
TrainData <- iris[,1:4]
TrainClasses <- iris[,5]

knnFit <- train(TrainData, TrainClasses, "knn")

resampleHist(knnFit)

## End(Not run)

caret

Classification and Regression Training

v6.0-86
GPL (>= 2)
Authors
Max Kuhn [aut, cre], Jed Wing [ctb], Steve Weston [ctb], Andre Williams [ctb], Chris Keefer [ctb], Allan Engelhardt [ctb], Tony Cooper [ctb], Zachary Mayer [ctb], Brenton Kenkel [ctb], R Core Team [ctb], Michael Benesty [ctb], Reynald Lescarbeau [ctb], Andrew Ziem [ctb], Luca Scrucca [ctb], Yuan Tang [ctb], Can Candan [ctb], Tyler Hunt [ctb]
Initial release

We don't support your browser anymore

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