Compute Mean Absolute Error (MAE)


Updated 15 May 2017

View License

MAE = getMAE(x,y)

Computes the Mean Absolute Error (MAE) between two vectors x and y of same length.


x : can be a function Interpolating the data points in 'y'. It is a < N y 1 > vector, typically resulting
from the application of 'polyfit' and 'polyval' functions.

y : can be observed data points for which I want to find the best-fitting function
(i.e. minimizing MAE, but avoiding overfitting). it's a < N y 1 > vector


MAE : Mean Absolute Error (a scalar).

Cite As

Ruggero G. Bettinardi (2023). getMAE(x,y) (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes