Defining our cost function

For regression tasks, the most common cost functions are Root Mean Squared Error (RMSE) and Mean Absolute Error (MAE). I'll be using MAE here. It is defined as follows:

Very simply, MAE is the average unsigned error for all examples in the dataset. It's very similar to RMSE; however, we use the absolute value of the difference between y and instead of the square root of the average squared error:

You might be wondering ...

Get Deep Learning Quick Reference 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.