0
$\begingroup$

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)

$\endgroup$

2 Answers 2

2
$\begingroup$

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.

$\endgroup$
3
  • $\begingroup$ Thank you for your response. What is this $||x||_2$ called? $\endgroup$ Commented Jun 10, 2019 at 5:56
  • 2
    $\begingroup$ Euclidean norm or $2$-norm. $\endgroup$ Commented Jun 10, 2019 at 5:58
  • 2
    $\begingroup$ This is $l_2$ norm $\endgroup$
    – ignatius
    Commented Jun 10, 2019 at 5:59
1
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.