Learn R Programming

MetricsWeighted (version 1.0.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, ...)

Value

A numeric vector of length one.

Arguments

actual

Observed values.

predicted

Predicted values.

w

Optional case weights.

...

Further arguments passed to weighted_mean().

See Also

rmse, deviance_normal.

Examples

Run this code
mse(1:10, c(1:9, 12))
mse(1:10, c(1:9, 12), w = 1:10)

Run the code above in your browser using DataLab