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
$\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.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thank you for your response. What is this $||x||_2$ called? $\endgroup$ – Fatemeh Asgarinejad Jun 10 '19 at 5:56
  • 2
    $\begingroup$ Euclidean norm or $2$-norm. $\endgroup$ – Siong Thye Goh Jun 10 '19 at 5:58
  • 2
    $\begingroup$ This is $l_2$ norm $\endgroup$ – ignatius Jun 10 '19 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.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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