Error

0th

Percentile

Error Calculation

Calculate the mean absolute error (MAE), mean square error (MSE), root mean square error (RMSE) and for matrices also the Frobenius norm (identical to RMSE).

Usage
MSE(true, predicted, na.rm = TRUE) RMSE(true, predicted, na.rm = TRUE) MAE(true, predicted, na.rm = TRUE) frobenius(true, predicted, na.rm = TRUE)
Arguments
true
true values.
predicted
predicted values
na.rm
ignore missing values.
Details

Frobenius norm requires matrices.

Value

The error value.

Aliases
  • RMSE
  • frobenius
  • MSE
  • MAE
Examples
true <- rnorm(10)
predicted <- rnorm(10)

MAE(true, predicted)
MSE(true, predicted)
RMSE(true, predicted)

true <- matrix(rnorm(9), nrow = 3)
predicted <- matrix(rnorm(9), nrow = 3)

frobenius(true, predicted)
Documentation reproduced from package recommenderlab, version 0.2-1, License: GPL-2

Community examples

Looks like there are no examples yet.