Evaluates the trained models on the test data and computes performance metrics.
evaluate_models(
models,
train_data,
test_data,
label,
task,
metric = NULL,
event_class
)
A list with two elements:
A named list of performance metric tibbles for each model.
A named list of data frames with columns including truth, predictions, and probabilities per model.
A list of trained model objects.
Preprocessed training data frame.
Preprocessed test data frame.
Name of the target variable.
Type of task: "classification" or "regression".
The performance metric to optimize (e.g., "accuracy", "rmse").
A single string. Either "first" or "second" to specify which level of truth to consider as the "event".