Glossary term
Glossary term
Evaluation and Benchmarks
The average loss per example when L2 loss is used. Calculate Mean Squared Error as follows:
Calculate the L2 loss for a batch.
Divide the L2 loss by the number of examples in the batch.
Click the icon to see the formal math.
For example, consider the loss on the following batch of five examples:
Therefore, the Mean Squared Error is:
Mean Squared Error = L2 loss / Number of Examples
Mean Squared Error = 16/5 = 3.2
Mean Squared Error is a popular training optimizer, particularly for linear regression.
Contrast Mean Squared Error with Mean Absolute Error and Root Mean Squared Error.
TensorFlow Playground uses Mean Squared Error to calculate loss values.
Click the icon to see more details about outliers.
For example, consider the loss on the following batch of five examples:
Therefore, the Mean Squared Error is:
Mean Squared Error = L2 loss / Number of Examples
Created for this library
A demand forecasting team uses MSE during training because squared errors more aggressively penalize large misses that hurt inventory.
A pricing team uses MSE in its production demand model because the financial cost of large prediction errors scales super-linearly.
A research team uses MSE as the default loss for regression baselines because it produces smooth, well-understood gradients.
Definition source: Google for Developers Machine Learning Glossary | Creative Commons Attribution 4.0 License