Mean absolute error

The mean_absolute_error function computes mean absolute error, a risk metric corresponding to the expected value of the absolute error loss, or l1-norm loss. If ŷi is the predicted value of the ith sample, and yi is the corresponding true value, then the mean absolute error (MAE) estimated over n samples is defined as follows:

Get Machine Learning for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.