Mean absolute error (MAE) is another popular metric that's used for quality estimation for regression algorithms. The MAE metric is a linear function with equally weighted prediction errors. This metric is more robust for outliers than RMSE. It is given by the following equation:
The following example shows how to calculate MSE with the Shark-ML library:
AbsoluteLoss<> abs_loss;
auto mae = abs_loss(train_data.labels(), prediction);
The following example shows how to calculate MSE with the Shogun library:
auto mae_error = some<CMeanAbsoluteError>();
auto mae = mae_error->evaluate(predictions, train_labels);