S7 generic for SupervisedRes results, including
regression and classification. Uses recorded per-resample metrics in
resample_ids order; list names do not change that producer contract.
The default metric is balanced_accuracy for classification and rsq for
regression. Classification selects overall metrics, not per-class scores.
Arguments
- x
rtemis::SupervisedRes: Resampled fitted model.
- ...
Method arguments, including
what(Character:"all"or unique"training"and/or"test"samples) andmetric(Optional Character: stored metric name), followed by additional arguments tortemis.draw::draw_metric().
Details
All available training and test reports are selected by default. An explicitly requested unavailable report is an error. Missing metric values remain missing; a metric absent from every selected report is an error. No predictions or aggregate means are used to reconstruct fold values.
Examples
if (FALSE) { # interactive()
model <- train(mtcars[, c("wt", "mpg")],
hyperparameters = setup_GLM(),
outer_resampling_config = setup_KFold(n_resamples = 3L),
execution_config = setup_SerialExecution(),
verbosity = 0L
)
plot_metric(model)
}