A Supervised model stores metrics for the training sample, and for the
validation and test samples when train received dat_validation and
dat_test. A SupervisedRes model stores per-resample metrics for the
training and test samples of each outer resample, with their mean and
standard deviation. A calibrated classifier also stores the metrics of its
calibrated predictions, selected with calibrated = TRUE.
A Clustering or Decomposition stores metrics for the data it was fitted
on, which sample = NULL and sample = "training" both select. For a
decomposition, decomposition_metrics() computes the metrics of new data.
Requesting a sample the object does not store raises an error that names the
samples it does store.
The returned object supports $ and [[: for example,
get_metrics(mod, "test")$rsq.