powered by
Create a lattice histogram or densityplot from the resampled outcomes from a train object.
train
resampleHist(object, type = "density", ...)
an object resulting form a call to train
a character string. Either "hist" or "density"
options to pass to histogram or densityplot
a object of class trellis
trellis
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.
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".
returnResamp
trainControl
train, histogram, densityplot, histogram.train, densityplot.train, xyplot.train, stripplot.train
histogram
densityplot
# NOT RUN { # } # NOT RUN { data(iris) TrainData <- iris[,1:4] TrainClasses <- iris[,5] knnFit <- train(TrainData, TrainClasses, "knn") resampleHist(knnFit) # } # NOT RUN { # }
Run the code above in your browser using DataLab