Learn R Programming

valueprhr (version 0.1.0)

evaluate_insample: Evaluate In-Sample Model Performance

Description

Computes various error metrics comparing predictions to actual values.

Usage

evaluate_insample(predicted, actual)

Value

A list containing:

mae_log

MAE in log scale

rmse_log

RMSE in log scale

mae_orig

MAE in original scale (after exp transformation)

rmse_orig

RMSE in original scale

mae_rel_range

MAE as percentage of range

Arguments

predicted

Numeric vector of predicted values (log scale).

actual

Numeric vector of actual values (log scale).

Examples

Run this code
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