Mean Squared Error (MSE)

Also known as: MSE, L2 Loss

Category: Foundations of ML/AI

A loss function that computes the average of the squared differences between predicted and actual values, commonly used in regression.

Full Explanation

Mean squared error (MSE) is the most widely used loss function for regression tasks, calculated as the average of the squared differences between predictions and true values. By squaring the errors, MSE penalizes larger errors disproportionately more than smaller ones, making it sensitive to outliers. MSE has convenient mathematical properties: it is differentiable everywhere, convex for linear models, and its gradient is simple to compute. The square root of MSE (RMSE) provides an error metric in the same units as the target variable. While MSE is effective for many regression problems, its sensitivity to outliers can be problematic in some domains. Alternatives like mean absolute error or Huber loss may be preferred when robustness to outliers is important.

Related Terms

More in Foundations of ML/AI

Explore More