Learn R Programming

MetricsWeighted (version 0.1.0)

rmse: Root-mean-squared error

Description

Weighted root-mean-squared error of predicted values. Equals the square root of mean-squared error.

Usage

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

Arguments

actual

Observed values.

predicted

Predicted values.

w

Optional case weights.

...

Further arguments passed to mse.

Value

A numeric vector of length one.

See Also

mse.

Examples

Run this code
# NOT RUN {
rmse(1:10, (1:10)^2)
rmse(1:10, (1:10)^2, w = rep(1, 10))
rmse(1:10, (1:10)^2, w = 1:10)

# }

Run the code above in your browser using DataLab