Learn R Programming

fastml (version 0.2.0)

evaluate_models: Evaluate Models Function

Description

Evaluates the trained models on the test data and computes performance metrics.

Usage

evaluate_models(models, train_data, test_data, label, task, metric = NULL)

Value

A list of performance metrics for each model.

Arguments

models

A list of trained model objects.

train_data

Preprocessed training data frame.

test_data

Preprocessed test data frame.

label

Name of the target variable.

task

Type of task: "classification" or "regression".

metric

The performance metric to optimize (e.g., "accuracy", "rmse").