MetricsWeighted (version 0.3.0)

mse: Mean-Squared Error

Description

Calculates weighted mean-squared error of prediction. Equals mean unit normal deviance. The smaller, the better.

Usage

mse(actual, predicted, w = NULL, ...)

Arguments

actual

Observed values.

predicted

Predicted values.

w

Optional case weights.

...

Further arguments passed to weighted_mean.

Value

A numeric vector of length one.

See Also

rmse, deviance_normal.

Examples

Run this code
# NOT RUN {
mse(1:10, c(1:9, 12))
mse(1:10, c(1:9, 12), w = rep(1, 10))
mse(1:10, c(1:9, 12), w = 1:10)
# }

Run the code above in your browser using DataLab