Join the conversation

🔑 Rule of Thumb:
If features are correlated and smooth, go with Euclidean.If features are independent or grid-based, go with Manhattan.
Reply

Use When:
The features (dimensions) are continuous and real-valued (e.g., height, weight)You care about the actual shortest pathThe scale and direction of difference mattersThe data is dense, not sparse
Examples:
Image recognition (pixels in high-dim space)Clustering when points lie in smooth, continuous space (e.g., KMeans)Calculating distance between GPS coordinates (with slight adjustments)
When to Use Manhattan Distance (p=1)
Your data has categorical or ordinal features turned into numbersYou care about individual axis changes more than diagonal closenessThe space is sparse (most values are zero)
Examples:
Text data (bag-of-words, TF-IDF, etc.)Recommender systems (user-item matrices)
Reply

Nice Detail

Choosing between Euclidean and Manhattan distance depends on the specific parameters of your application, including dimensionality, data characteristics, computational efficiency, geometric interpretation, and the context of use. Understanding these factors will help you select the most appropriate distance metric for your needs.
Reply

done this lecture
Reply

--> When to Use Manhattan Distance
1. Grid-based layouts:
Example: City streets, chessboards.
2. High-dimensional data:
Example: Text document comparisons.
3. Feature differences matter:
Example: Comparing categorical data or counts.
--> When to Use Euclidean Distance
1. Geometric/spatial data:
Example: Physical distances on a map.
2. Low-dimensional data:
Example: 2D or 3D space measurements.
3. Natural Euclidean space:
Example: Image processing, real-world distances.
Reply

Use Euclidean distance for continuous data and geometric measurements, and Manhattan distance for categorical, ordinal, or discrete data, as it ignores diagonal movements and focuses on step-by-step changes.
Reply

Done
Reply

It's better to use Minkowski Distance, because of its flexibility.
Reply

Euclidean distance and Manhattan distance are both distance metrics used in various fields, particularly in mathematics, computer science, and machine learning.
Reply

Euclidean distance and Manhattan distance are both distance metrics used in various fields, particularly in mathematics, computer science, and machine learning.
Reply