Machine Learning Basics
Four data points have actual values 3, 5, 2 and 6, and the model predicts 2, 5, 4 and 4 for them. What is the mean squared error (MSE)?
- A1.25
- B2.25
- C9
Show answer and explanation
Answer: B. 2.25
The errors (actual value − predicted value) are 1, 0, −2 and 2. The MSE is the mean of the squared errors: (1 + 0 + 4 + 4) ÷ 4 = 2.25. The mean absolute error (MAE), the mean of the absolute errors, is (1 + 0 + 2 + 2) ÷ 4 = 1.25. Because the MSE squares the errors, it is affected more strongly than the MAE by data points that are far off (outliers).
- A. This is the mean absolute error (MAE).
- B. Correct. (1 + 0 + 4 + 4) ÷ 4 = 2.25.
- C. This is the sum of the squared errors, not divided by the number of data points, 4.