# How to infer nearest neighbors using distance metrics

My team and I are trying to identify group of customers to target for an investment promotion exercise. We decided to use the control group (which already are a part of this investment exercise) and use distance metrics on our test group (people we want to identify).

As we have 50+ attributes, we decided to use Manhattan distance for our nearest neighbor approach. The ideology being that if a point A in test group is closer to point B in control group (in their respective feature spaces).

Now the challenge is how to visualize this in real world:

As these are amount variables involved, we had to scale our control and test groups to a normalized scale space. Consider information on points A and B (as above) -

        Scaled Feature space                  Raw Feature Space

Point           Gross Amount                       Gross Amount

A1                       0.1                               2028
B1                       0.4                           10027921
B2                       0.5                           30010374



In the above example A1 and B1 are the 'nearest' neighbors as A1 is closer to B1 than B2 from the control group but if we were to actually look at the raw gross amounts, 2k is closer to 10M than 30M but is it 'close'?

I think this is more of a theoretical question of how to explain such disparity in numbers for the uninitiated with distance metrics or nearest neighbors concept.

If you live in the city, your nearest neighbor might be on the opposite side of the wall. If you live in the middle of a desert, they might be many kilometers away from you. In nearest neighbors, you care about the neighbors that are nearest to you, not near enough. If you could come up with a meaningful threshold like "all the points with gross amount $$\pm$$1000", then sure, you can use such a rule instead.
$$d(\mathbf{p},\mathbf{q}) = \sum_{i=1}^k | p_i - q_i |$$
you consider $$k$$ features (e.g. age, height, salary, and the number of tweets they send in the previous year) for two persons $$\mathbf{p}$$ and $$\mathbf{q}$$, for each feature you look at the absolute value of the difference between the two, so the magnitude of the difference, it will be small when the values are similar, big when they are different, next you sum up all the absolute differences to get a single number. No black magic here.