rmse: Root Mean Square Error

Description Usage Arguments Details References Examples

Description

Calculate Root-Mean-Square Error (Deviation)

For the ith sample, Squared Error is calculated as SE = (prediction - actual)^2. RMSE is then sqrt(mean(squared errors)).

Usage

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

Arguments

preds

A vector of prediction values in [0, 1]

actuals

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

weights

Optional vectors of weights

na.rm

Should (prediction, actual) pairs with at least one NA value be ignored?

Details

Calculate Root-Mean-Square Error (Deviation)

References

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

Examples

1
2
3
preds <- c(1.0, 2.0, 9.5)
actuals <- c(0.9, 2.1, 10.0)
rmse(preds, actuals)

mltools documentation built on May 2, 2019, 5:22 a.m.