powered by
Computes various error metrics comparing predictions to actual values.
evaluate_insample(predicted, actual)
A list containing:
MAE in log scale
RMSE in log scale
MAE in original scale (after exp transformation)
RMSE in original scale
MAE as percentage of range
Numeric vector of predicted values (log scale).
Numeric vector of actual values (log scale).
set.seed(123) actual <- log(runif(50, 100, 200)) predicted <- actual + rnorm(50, 0, 0.1) evaluate_insample(predicted, actual)
Run the code above in your browser using DataLab