# A substitute formula for MSE

I don't understand where this formula for Mean Squared Error is coming from.

How do we arrive at:

$$MSE = \frac{1}{m}||y' - y||_2^2$$

from:

$$MSE = \frac{1}{m}\cdot\sum_i(y'_{i} - y_{i})^2$$

(The source is deeplearningbook)

We have $$\|x\|_2=\sqrt{\sum_{i=1}^n x_i^2}$$

Hence $$\|x\|_2^2=\sum_{i=1}^n x_i^2$$

Now let $$x=y'-y$$ and you obtain your formula.

• Thank you for your response. What is this $||x||_2$ called? – Fatemeh Asgarinejad Jun 10 '19 at 5:56
• Euclidean norm or $2$-norm. – Siong Thye Goh Jun 10 '19 at 5:58
• This is $l_2$ norm – ignatius Jun 10 '19 at 5:59

The Euclidean norm from above falls into this class and is the 2-norm, and the 1-norm is the norm that corresponds to the rectilinear distance.

Check out $$L_p$$ space (https://en.wikipedia.org/wiki/Lp_space) for info on the relations between norm spaces and a generalization of the p-norm for finite-dimensional vector spaces.