mae: Mean Absolute Error

Description Usage Arguments Value Author(s) Examples

Description

Calculates the mean absolute error between target values and predictions

mae = ∑_i^N{|y_i - \hat y_i|} / N

Usage

1
2
3
4
5
6
7
## S3 method for class 'modello_number'
mae(y, yh)

## Default S3 method:
mae(y, yh)

mae(y, yh)

Arguments

y

target values

yh

predictions

Value

Returns the mse

Author(s)

Filippo Monari

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
modello.init(10, 10, 10, 10)
## For modello_numbers
y = number(rnorm(10), dx=FALSE)
yh = number(rnorm(10), dx=FALSE)
h = mae(y, yh)
print(h)
print(h$v)
modello.close()
## For numerics
y = rnorm(10)
yh = rnorm(10)
h = mae(y, yh)
print(h)

modello documentation built on Feb. 2, 2021, 9:06 a.m.

Related to mae in modello...