Error {recommenderlab} | R Documentation |
Error Calculation
Description
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.
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)
[Package recommenderlab version 1.0.6 Index]