rmse {jjb} | R Documentation |
Root Mean Squared Error (RMSE)
Description
Calculates the root mean square of the model by taking the square root of
mean of the sum of squares between the truth, , and the predicted,
at each observation
.
Usage
rmse(y, yhat)
Arguments
y |
A |
yhat |
A |
Details
The formula for RMSE is:
Value
The RMSE in numeric
form
Examples
# Set seed for reproducibility
set.seed(100)
# Generate data
n = 1e2
y = rnorm(n)
yhat = rnorm(n, 0.5)
# Compute
o = mse(y, yhat)
[Package jjb version 0.1.1 Index]