calculate_errors: Calculate error metrics

Description Usage Arguments Value Functions

Description

Calculate error metrics

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
mse(y, y_hat, na.rm = TRUE)

rmse(y, y_hat, na.rm = TRUE)

mae(y, y_hat, na.rm = TRUE)

nmae(y, y_hat, y_train = NULL, statFUN = stats::median, na.rm = TRUE)

nmse(y, y_hat, y_train = NULL, statFUN = mean, na.rm = TRUE)

nrmse(y, y_hat, y_train = NULL, statFUN = mean, na.rm = TRUE)

Arguments

y

a vector of true values

y_hat

a vector of predicted values

na.rm

boolean indicating whether NAs should be removed. Default is TRUE

y_train

a vector of training values

statFUN

summary statistic to use for normalization. Default is median for nmae and mean for nmse.

Value

one error value

Functions


mrfoliveira/STEvaluation-MDPI2021 documentation built on Dec. 21, 2021, 10:07 p.m.