One Pager Cheat Sheet
- The Manhattan Distance, also known as city block distance or taxicab geometry, calculates the distance between two coordinates in a grid-like path, similar to pathways on a city map, rather than a direct line.
- The Manhattan Distance, measured along grid-like city blocks, is calculated using the formula ( d = |x_1 - x_2| + |y_1 - y_2| ) and is implemented in machine learning (especially in clustering algorithms, such as the K-Nearest Neighbors) and other applications where a
distance metricbetween twodatasetsorvectorsis needed, with libraries in languages likePython(particularly thecityblockfunction from thescipy.spatial.distancelibrary) simplifying the process. - The Manhattan Distance, also known as
city block distance, measures the total distance traveled along a grid by calculating the combinedhorizontalandvertical distancecovered, mimicking navigation in a city built on a grid system. - The Manhattan distance between two vectors
C (3,2,5)andD (4,1,7)is calculated by summing the absolute differences of their coordinates, resulting in aManhattan Distanceof4. - The Manhattan Distance, also known as
"L1 distance"or"Taxicab"or"City block"distance, originated from the grid-like street layout of Manhattan, is a geometric concept that calculates the total horizontal and vertical distances between two points, and has diverse applications in fields including computer vision, games, robotics, and economics. - The Manhattan Distance, which is the sum of the absolute differences between two
vectors, is crucial in Machine Learning and preferred over theEuclidean distance metricas the dimensions of the data increase.


