powered by
Computes the bias (mean error) between the input vectors.
bias(actual, predicted, na.rm = FALSE)
A double scalar with the bias value.
A numeric vector with the actual values.
A numeric vector with the predicted values. Each element in this vector must be a prediction for the corresponding element in actual.
actual
A logical value indicating whether NA values should be stripped before the computation proceeds. Defaults to FALSE.
NA
FALSE
mean_error(), loa()
mean_error()
loa()
actual <- runif(10) predicted <- runif(10) bias(actual, predicted)
Run the code above in your browser using DataLab