resampleSummary: Summary of resampled performance estimates

Description Usage Arguments Details Value Author(s) See Also Examples

Description

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

Usage

1
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

postResample

Examples

1

Example output

Loading required package: lattice
Loading required package: ggplot2
$metrics
     RMSE  Rsquared      RMSE  Rsquared 
1.4853702 0.2028946 0.4093098 0.1547321 

$data
           obs        pred      group
1  -1.53091974 -0.09777213 Resample 1
2   2.23065473 -1.45998226 Resample 1
3   0.90311052 -1.56459904 Resample 1
4  -1.27001335  0.52857263 Resample 1
5  -0.40720875 -0.45670407 Resample 1
6   1.60648324 -0.46361156 Resample 1
7  -0.47344238  0.40397123 Resample 1
8  -1.81588737 -0.44518099 Resample 1
9   0.31280372 -2.02877868 Resample 1
10 -0.03341057 -0.70451908 Resample 1
11 -1.53091974 -0.27720262 Resample 2
12  2.23065473  0.15414593 Resample 2
13  0.90311052 -1.03243866 Resample 2
14 -1.27001335 -0.40549461 Resample 2
15 -0.40720875  0.33574963 Resample 2
16  1.60648324  1.69293392 Resample 2
17 -0.47344238  0.69199852 Resample 2
18 -1.81588737 -0.50689381 Resample 2
19  0.31280372  0.03003636 Resample 2
20 -0.03341057  0.02631330 Resample 2
21 -1.53091974 -2.27027532 Resample 3
22  2.23065473  0.44467214 Resample 3
23  0.90311052  0.10991144 Resample 3
24 -1.27001335 -0.03290493 Resample 3
25 -0.40720875 -0.86419900 Resample 3
26  1.60648324 -0.13189555 Resample 3
27 -0.47344238  0.60041621 Resample 3
28 -1.81588737 -1.99932517 Resample 3
29  0.31280372 -0.02309390 Resample 3
30 -0.03341057  1.05759269 Resample 3
31 -1.53091974 -0.22388283 Resample 4
32  2.23065473  0.04219458 Resample 4
33  0.90311052  0.26692976 Resample 4
34 -1.27001335 -1.61554538 Resample 4
35 -0.40720875  0.76642735 Resample 4
36  1.60648324  1.07522521 Resample 4
37 -0.47344238 -1.71866513 Resample 4
38 -1.81588737  0.17131991 Resample 4
39  0.31280372 -1.44074303 Resample 4
40 -0.03341057 -0.13421012 Resample 4
41 -1.53091974  1.16635486 Resample 5
42  2.23065473  0.05285156 Resample 5
43  0.90311052  1.76584112 Resample 5
44 -1.27001335  0.03257193 Resample 5
45 -0.40720875 -0.57601308 Resample 5
46  1.60648324  1.58629699 Resample 5
47 -0.47344238  0.62291919 Resample 5
48 -1.81588737  2.54219916 Resample 5
49  0.31280372  0.83880398 Resample 5
50 -0.03341057 -1.13518554 Resample 5

caret documentation built on May 2, 2019, 5:47 p.m.

Related to resampleSummary in caret...