```
#> # A tibble: 1 × 6
#> .metric .estimator mean n std_err .config
#> <chr> <chr> <dbl> <int> <dbl> <chr>
#> 1 roc_auc binary 0.830 10 0.00751 Preprocessor1_Model1
```

Since we fit a model to each of the 10 training sets and then measure the AUC in the 10 testing sets, we have 10 test AUCs in total. We can then average the 10 AUCs to get the overall cross-validated AUC, which is presented in the `mean`

column. The `n`

column shows how many values were used in computing the average, and this number may change if you use more/less resamples, such as with bootstrapping, LOO-CV, or just a different number of folds in `vfold_cv`

. Hope that helps.

As for getting the 95% CI, this is not straightforward to do in the `tidymodels`

framework. You can definitely do this yourself by using `control_resamples(save_pred = TRUE)`

and then computing the AUCs yourself using the `pROC`

package, or whichever package you prefer. It is a bit longwinded, but something like this should work...

```
# Fit the model to the resamples, save predictions this time
results <-
fit_resamples(
wflow,
resamples = folds,
metrics = metric_set(roc_auc),
control = control_resamples(
event_level = 'second',
save_pred = TRUE
)
)
library(pROC)
collect_predictions(results) %>%
group_nest(id) %>%
mutate(
aucs = map(data, function(x) {
roc = roc(before_1960 ~ .pred_1, data = x,
direction = '<', ci = TRUE)
as.numeric(roc$ci)
})
) %>%
unnest_wider(aucs) %>%
rename(auc = ...2, conf.low = ...1, conf.high = ...3) %>%
summarise(
n = n(),
across(c(auc, conf.low, conf.high), mean)
)
#> # A tibble: 1 × 4
#> n auc conf.low conf.high
#> <int> <dbl> <dbl> <dbl>
#> 1 10 0.829 0.780 0.878
```