Learn R Programming

mltools (version 0.2.0)

rmse: Root Mean Square Error

Description

Calculate Root-mean-square error (deviation)

Usage

rmse(preds = NULL, actuals = NULL, na.rm = FALSE)

Arguments

preds

A vector of prediction values in 1, 0, or TRUE, FALSE

actuals

A vector of actuals values in 1, 0, or TRUE, FALSE

na.rm

Should NA values be ignored?

Details

Calculate Root-mean-square error (deviation)

References

https://en.wikipedia.org/wiki/Root-mean-square_deviation

Examples

Run this code
preds <- c(1.0, 2.0, 9.5)
actuals <- c(0.9, 2.1, 10.0)
rmse(preds, actuals)

Run the code above in your browser using DataLab