0
$\begingroup$

Let's say I have the following two vectors:

x = [(10-1).*rand(7,1) + 1; randi(10,1,1)];
y = [(10-1).*rand(7,1) + 1; randi(10,1,1)];

The first seven elements are continuous values in the range [1,10]. The last element is an integer in the range [1,10].

Now I would like to compute the euclidean distance between x and y. I think the integer element is a problem because all other elements can get very close but the integer element has always spacings of ones. So there is a bias towards the integer element.

First, is there really a bias when I would use just the (non normalized) Euclidean distance?

Second, how can I calculate something like a normalized euclidean distance on it?

$\endgroup$
0
$\begingroup$
  1. That depends; what are you trying to estimate? Recall the definition of bias: the bias of an estimator $\phi$ for a quantity $θ$ is the mean of $\phi - θ$. An estimator is unbiased when its bias is 0. So, a quantity can be biased when considered as an estimator of one quantity and unbiased considered as an estimator of another quantity.
  2. There are many options, one of which is to convert each dimension to $z$-scores before computing distances.
$\endgroup$
  • $\begingroup$ Thank you very much for your answer. Regarding 1: It is in an optimization setting. That means y are the true parameters and x are the estimated parameters from my optimization routine. A smaller distance between x and y means that my optimization routine was better able to find the true parameters. Is in this case just using the (not normalized) Euclidean distance ok? $\endgroup$ – machinery Jul 3 '16 at 15:26
  • $\begingroup$ Regarding 2: I have only 2 points (x and y), i.e. each dimension only has 2 values. Converting to z-scores means to subtract the mean and divide by the standard deviation. Is this procedure for only 2 values per dimension still applicable? $\endgroup$ – machinery Jul 3 '16 at 15:27
  • $\begingroup$ I don't understand your situation well. If you add much more detail to your question, perhaps I'll be able to give you more specific advice. $\endgroup$ – Kodiologist Jul 3 '16 at 15:35

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.