Summarize a cpm_resamples object
Value
A cpm_resamples_summary object with the following elements:
metricsA data frame with columns
level,metric,prediction,estimate,std_error, andmethod. Resample summaries store pooled errors and pooled correlations atlevel = "pooled", and fold-wise correlation summaries atlevel = "foldwise".edgesAggregated edge-selection rates, or
NULLwhen edges were not stored.paramsA list containing summary-relevant resampling settings.
Details
summary.cpm_resamples() is designed to give a compact default report.
It leads with pooled out-of-fold error metrics (RMSE and MAE), then
reports pooled and fold-wise correlations as supplementary statistics.
This keeps the default summary usable even when fold-wise correlations are
undefined for some resampling schemes, such as leave-one-out resampling.
Examples
withr::local_seed(123)
conmat <- matrix(rnorm(200), nrow = 20)
behav <- rowMeans(conmat[, 1:5, drop = FALSE]) + rnorm(20, sd = 0.2)
res <- fit_resamples(cpm_spec(), conmat = conmat, behav = behav, kfolds = 4)
summary(res)
#> CPM resample summary:
#> Number of folds: 4
#> Prediction error:
#> RMSE:
#> Combined: 0.432
#> Positive: 0.432
#> Negative: 0.452
#> MAE:
#> Combined: 0.365
#> Positive: 0.365
#> Negative: 0.358
#> Pooled correlations (Pearson):
#> Combined: 0.243
#> Positive: 0.243
#> Negative: -0.195
#> Fold-wise correlations (Pearson):
#> Combined: 0.454
#> Positive: 0.454
#> Negative: NA