Calculates a large set of error metrics from regression residuals.
Note : In most cases you should use evaluate() instead. It works in magrittr pipes (e.g. %>%) and with dplyr::group_by(). evaluate_residuals() is more lightweight and may be preferred in programming when you don't need the extra stuff in evaluate().
target_col: Name of the column with the true values in data.
prediction_col: Name of column with the predicted values in data.
metrics: list for enabling/disabling metrics.
E.g. list("RMSE" = FALSE) would disable RMSE. Default values (TRUE/FALSE) will be used for the remaining available metrics.
You can enable/disable all metrics at once by including "all" = TRUE/FALSE in the list. This is done prior to enabling/disabling individual metrics, why for instance list("all" = FALSE, "RMSE" = TRUE)
would return only the RMSE metric.
The list can be created with gaussian_metrics().
Also accepts the string "all".
Returns
tibbledata.frame with the calculated metrics.
The following metrics are available (see metrics):
Metric
Name
Default
Mean Absolute Error
"MAE"
Enabled
Root Mean Square Error
"RMSE"
Enabled
Normalized RMSE (by target range)
"NRMSE(RNG)"
Disabled
Normalized RMSE (by target IQR)
"NRMSE(IQR)"
Enabled
Normalized RMSE (by target STD)
"NRMSE(STD)"
Disabled
Normalized RMSE (by target mean)
"NRMSE(AVG)"
Disabled
Relative Squared Error
"RSE"
Disabled
Root Relative Squared Error
"RRSE"
Enabled
Relative Absolute Error
"RAE"
Enabled
Root Mean Squared Log Error
"RMSLE"
Enabled
Mean Absolute Log Error
"MALE"
Disabled
Mean Absolute Percentage Error
"MAPE"
Disabled
Mean Squared Error
"MSE"
Disabled
Total Absolute Error
"TAE"
Disabled
Total Squared Error
"TSE"
Disabled
The Name column refers to the name used in the package. This is the name in the output and when enabling/disabling in metrics.
Details
The metric formulas are listed in The Available Metrics vignette.