1
$\begingroup$

I have seen this formula in multiple domains, e.g., machine learning. I would like to understand what is it doing exactly, what is the effect of this function? How does it do better than other methods? I dont hold a math degree, but I do want to understand why..

in machine learning, i could not recall (for error calculation?):

$\sqrt{\sum{(x^2_1+x^2_2+\ldots+x^2_N)}}$

  • 0
    What you are showing is not a distance, but a norm. (A distance is between two points, a norm is the distance from a point to the origin.) The Euclidean distance is just the distance you learnt in geometry (length of a line segment). It is invariant under rotations, i.e. does not depend on the orientation of the axis.2017-02-14
  • 0
    Thanks @YvesDaoust Could you give me an simple example of using the Euclidean Norm that could help me understand why it is useful ?2017-02-14
  • 0
    What is your understanding of the use of a distance/norm in general ?2017-02-14
  • 0
    @YvesDaoust I do understand 1, 2, 3 dimension of Euclidean distance because I can see it by drawing it, plotting it visually. I do understand the relation of it with cosine. That's about it.2017-02-14
  • 0
    So where's the problem ? You are just in N-dimensional space.2017-02-14
  • 0
    I dont understand why it is useful... what characteristic does it has? for example, for many others use R Squared to determine the accuracy of a prediction model (and here we are using euclidean distance).2017-02-14
  • 1
    A distance is just a measure of closeness, and a norm a measure of closeness to zero.2017-02-14
  • 0
    You reminded me L2 norm, L1 norm regularization when you talk about closeness to zero. Thanks..2017-02-14

1 Answers 1

2

Given a point in a plane, that is $x_1$ meters to the north of you and $x_2$ meters to the East. The distance is simply calculated by using the pythagoean theorem by $\sqrt{x_1^2 + x_2^2}$.

This can be extended to higher dimensions, by adding more squares under the root. This is then called the euclidean length of a vector $x$.

Usually, the euclidean distance of an error is used to define the accuracy. Meaning: You have a known solution $s$ and an approximation $x$. You define your error $e = \|s-x\|_2$, since that is an easy and consistant way to map a multidimensional vector to a single posiive number. This error $e$ can than be used as objective-function in a minimization-process to determine parameters, that helped you obtain $x$ in the first place.

(I think, that that is, what is done at machine-learning, I'm no expert in that field)

  • 0
    Thank you for your answer, I do understand it is a Euclidean distance in n dimension. For pythagoean, the result I know it is the slope of the triangle with 90 degree angle... but to apply this to other domain, e.g. in machine learning, what does the result mean? why do we use euclidean distance to each error (x) value ( error = predicted value - expected value)?2017-02-14
  • 0
    what do you by "to map a multidimensional vector to a single posiive number" ?... do you mean removing the negative value? If that's the case, why don't just remove the square root.2017-02-14
  • 0
    Usually in optimization, you hat an objective function $f: \mathbb{R}^n \rightarrow \mathbb{R}$. That's also the case in machine learning IIRC. There is an extensive amount of theory developed for that case.2017-02-14