mse: Mean Squared Error

Description Usage Arguments Value Author(s) Examples

Description

Mean Squared Error between target values and predictions

mse = ∑_i^N{(y_i - \hat y_i)^2} / N

Usage

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

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

mse(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))
h = mse(y, yh)
print(h)
print(h$v)
modello.close()
## For numerics
y = rnorm(10)
yh = rnorm(10)
h = mse(y, yh)
print(h)

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

Related to mse in modello...