Skip to contents

This function calculates various model evaluation metrics, including R-squared, Mean Squared Error (MSE), Root Mean Squared Error (RMSE), and Mean Absolute Error (MAE), for different subsets of data (all, train, and test).

Usage

ml_evaluate(object, model, ...)

# S4 method for class 'feature_data'
ml_evaluate(
  object,
  model,
  xprep = c("both", "scale", "transform", "none"),
  yprep = c("both", "scale", "transform", "none"),
  ...
)

Arguments

object

An object of class `feature_data` containing the data subsets.

model

The fitted model to be evaluated.

...

Additional arguments (currently ignored).

xprep

Character argument if transformed input data ("transform"), scaled data ("scale" ), transformed and scaled data ("both") or original raw x data ("none") are used.

yprep

Character argument if transformed target values ("transform") or original raw y-values ("none") are used.

Value

A data frame containing the evaluation metrics for each data subset. Rows represent the metrics (R2, MSE, RMSE, MAE), and columns represent the data subsets (all, train, test).

Details

The parameters `xprep` and `yprep` must be exactly the same that were used as input and output for the fitted model, Rescaling of `yprep` will be implemented in future versions of the package.

Functions

  • ml_evaluate(feature_data): Method for estimating a set of model evaluation criteria for a model and a `feature_data` object.