Learn R Programming

measures (version 0.3)

SAE: Sum of absolute errors

Description

Defined as: sum(abs(response - truth))"

Usage

SAE(truth, response)

Arguments

truth

[numeric] vector of true values

response

[numeric] vector of predicted values

Examples

Run this code
# NOT RUN {
n = 20
set.seed(123)
truth = rnorm(n)
response = rnorm(n)
SAE(truth, response)
# }

Run the code above in your browser using DataLab