Questions tagged [manhattan]

Manhattan Distance is an alternative distance metric to Euclidean Distance. It is calculated by taking the absolute difference between two points.

Formally, it is given by:

$d_1(x, y) = \|x - y\|_1 = \sum\limits_{i=1}^{n} |x_i - y_i|$

As an example:

If $x = (a, b)$ and $y = (c, d)$ then:

Manhattan Distance = $|a - c| + |b - d|$

4 questions
7
votes
2 answers

Coordinate System's influence on $L$ distances (Manhattan and Euclidean)

I don't understand this picture, which says if we change the coordinate system, we would have the same result for $L_2$ distance, whereas, our result would differ for $L_1$ distance. What does it mean by coordinate system? $(0,0)$ if yes, the…
Fatemeh Asgarinejad
  • 1,198
  • 1
  • 10
  • 18
3
votes
1 answer

Very basic question: what is an accepted term for "linear order distance"

In data science we have "Manhattan Distance" as a slang term for Level 1 Distance and "Euclidean Distance" as a slang term for Level 2 Distance. Is there an accepted term for linear distance in memory of cells in different rows in a matrix? That is,…
Jack Parsons
  • 126
  • 1
  • 6
1
vote
4 answers

Estimating time to travel between two lat/longs

I'm trying to create an offline estimator for how long it would take to get from one lat/long to another. Two approaches I have come across are the Haversine distance and the Manhattan distance. What I'm thinking of doing is calculating both of them…
C Murphy
  • 129
  • 1
0
votes
1 answer

Cosine vs Manhattan for Text Similarity

I'm storing sentences in Elasticsearch as dense_vector field and used BERT for the embedding so each vector is 768 dim. Elasticsearch gives similarity function options like Euclidean, Manhattan and cosine similarity. I have tried them and both…