What is the difference between Mean Squared Error (MSE) and Mean Absolute Error (MAE)?

Quick Overview

Compares mean squared error and mean absolute error as regression losses and metrics. Tests whether you know which statistic each one estimates, how each reacts to outliers, how they differ during optimization, and how to pick one for a given cost of error.

What is the difference between Mean Squared Error (MSE) and Mean Absolute Error (MAE)?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

What is the difference between Mean Squared Error (MSE) and Mean Absolute Error (MAE)? Cover both their use as training losses and their use as evaluation metrics for regression. ```hint Try a constant prediction Take five targets where one is an outlier. Which single constant minimizes each loss, and how far does the outlier move it? ``` ### What a Strong Answer Covers - The definition of each metric and how each one treats the size of an error. - Which statistic each loss pulls the prediction toward, and the noise model each one corresponds to. - How outliers affect each metric, ideally shown with a small numeric example. - The optimization differences: smoothness, gradient behavior near the optimum, closed-form solutions and uniqueness. - How to choose between them for a given problem, including units and the role of RMSE. ### Follow-up Questions - What does Huber loss do, and how would you choose its threshold? - Why is RMSE always at least as large as MAE on the same predictions, and what does a large gap between them tell you? - The business needs a forecast that is exceeded only 10% of the time. Which loss would you train with? - A model trained with MSE is evaluated with MAE and looks biased on a skewed target. What is going on?

Overview: Compares mean squared error and mean absolute error as regression losses and metrics. Tests whether you know which statistic each one estimates, how each reacts to outliers, how they differ during optimization, and how to pick one for a given cost of error.

General logo
General
Nov 24, 2026
easyMachine Learning EngineerOtherMachine Learning
0
0

What is the difference between Mean Squared Error (MSE) and Mean Absolute Error (MAE)?

Cover both their use as training losses and their use as evaluation metrics for regression.

What a Strong Answer Covers Guidance

  • The definition of each metric and how each one treats the size of an error.
  • Which statistic each loss pulls the prediction toward, and the noise model each one corresponds to.
  • How outliers affect each metric, ideally shown with a small numeric example.
  • The optimization differences: smoothness, gradient behavior near the optimum, closed-form solutions and uniqueness.
  • How to choose between them for a given problem, including units and the role of RMSE.

Follow-up Questions Guidance

  • What does Huber loss do, and how would you choose its threshold?
  • Why is RMSE always at least as large as MAE on the same predictions, and what does a large gap between them tell you?
  • The business needs a forecast that is exceeded only 10% of the time. Which loss would you train with?
  • A model trained with MSE is evaluated with MAE and looks biased on a skewed target. What is going on?