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

resampleSummary

Summary of resampled performance estimates


Description

This function uses the out-of-bag predictions to calculate overall performance metrics and returns the observed and predicted data.

Usage

resampleSummary(obs, resampled, index = NULL, keepData = TRUE)

Arguments

obs

A vector (numeric or factor) of the outcome data

resampled

For bootstrapping, this is either a matrix (for numeric outcomes) or a data frame (for factors). For cross-validation, a vector is produced.

index

The list to index of samples in each cross-validation fold (only used for cross-validation).

keepData

A logical for returning the observed and predicted data.

Details

The mean and standard deviation of the values produced by postResample are calculated.

Value

A list with:

metrics

A vector of values describing the bootstrap distribution.

data

A data frame or NULL. Columns include obs, pred and group (for tracking cross-validation folds or bootstrap samples)

Author(s)

Max Kuhn

See Also

Examples

resampleSummary(rnorm(10), matrix(rnorm(50), ncol = 5))

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.