powered by
Calculates the root mean square error (RMSE) from observed and predicted values.
rmse(observed, predicted)
Numeric vector of observed values
Numeric vector of predicted values. The length shall be the same as for observed.
The root mean square err or (RMSE) calculated from the observed and the predicted values.
rmse = sqrt(mean((observed - predicted)^2))
# NOT RUN { o<-1:5 p<-c(2,2,4,3,5) rmse(observed=o, predicted=p) # }
Run the code above in your browser using DataLab