Skip to contents

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.

Usage

plot_metric(x, ...)

Arguments

x

rtemis::SupervisedRes: Resampled fitted model.

...

Method arguments, including what (Character: "all" or unique "training" and/or "test" samples) and metric (Optional Character: stored metric name), followed by additional arguments to rtemis.draw::draw_metric().

Value

htmlwidget: Metric distributions with all observations by default.

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)
}