{"id":12453,"date":"2023-10-11T15:01:54","date_gmt":"2023-10-11T09:31:54","guid":{"rendered":"https:\/\/skillioma.com\/learn\/courses\/ai-ml-nascomm-fsp\/lesson\/distances-minkowski-manhattan-euclidian-2\/"},"modified":"2024-02-02T16:16:40","modified_gmt":"2024-02-02T10:46:40","slug":"distances-minkowski-manhattan-euclidian-2","status":"publish","type":"lesson","link":"https:\/\/skillioma.com\/learn\/courses\/ai-ml-and-data-science-foundation-nascomm-fsp\/lesson\/distances-minkowski-manhattan-euclidian-2\/","title":{"rendered":"Distances &#8211; Minkowski \/ Manhattan \/ Euclidian"},"content":{"rendered":"<p><span style=\"font-weight: 400\" data-mce-style=\"font-weight: 400;\">The Minkowski, Manhattan, and Euclidean distances are all ways to measure the distance between points in a space. Let&#8217;s dive deeper into each of these.<\/span><br \/><b>&nbsp;<\/b><\/p>\n<h4><b>Minkowski Distance:<\/b><\/h4>\n<p><b>&nbsp;<\/b><br \/><a href=\"https:\/\/skillioma.com\/learn\/wp-content\/uploads\/2023\/10\/Minkoowski.png\" data-mce-href=\"https:\/\/skillioma.com\/learn\/wp-content\/uploads\/2023\/10\/Minkoowski.png\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-12506\" src=\"https:\/\/skillioma.com\/learn\/wp-content\/uploads\/2023\/10\/Minkoowski.png\" alt=\"\" width=\"512\" height=\"176\" data-mce-src=\"https:\/\/skillioma.com\/learn\/wp-content\/uploads\/2023\/10\/Minkoowski.png\" srcset=\"https:\/\/skillioma.com\/learn\/wp-content\/uploads\/2023\/10\/Minkoowski.png 512w, https:\/\/skillioma.com\/learn\/wp-content\/uploads\/2023\/10\/Minkoowski-300x103.png 300w, https:\/\/skillioma.com\/learn\/wp-content\/uploads\/2023\/10\/Minkoowski-145x50.png 145w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/><\/a><br \/><b>&nbsp;<\/b><\/p>\n<h4><b>Manhattan Distance (L1 norm):<\/b><\/h4>\n<p><b>&nbsp;<\/b><br \/><span style=\"font-weight: 400\" data-mce-style=\"font-weight: 400;\">Also known as the &#8220;city block&#8221; or &#8220;taxicab&#8221; distance, it&#8217;s the distance between two points in a grid-based path (like Manhattan street grids) and is computed as:<\/span><br \/><b>&nbsp;<\/b><br \/><a href=\"https:\/\/skillioma.com\/learn\/wp-content\/uploads\/2023\/10\/manhattan.png\" data-mce-href=\"https:\/\/skillioma.com\/learn\/wp-content\/uploads\/2023\/10\/manhattan.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-12505\" src=\"https:\/\/skillioma.com\/learn\/wp-content\/uploads\/2023\/10\/manhattan.png\" alt=\"\" width=\"362\" height=\"87\" data-mce-src=\"https:\/\/skillioma.com\/learn\/wp-content\/uploads\/2023\/10\/manhattan.png\" srcset=\"https:\/\/skillioma.com\/learn\/wp-content\/uploads\/2023\/10\/manhattan.png 362w, https:\/\/skillioma.com\/learn\/wp-content\/uploads\/2023\/10\/manhattan-300x72.png 300w, https:\/\/skillioma.com\/learn\/wp-content\/uploads\/2023\/10\/manhattan-208x50.png 208w\" sizes=\"(max-width: 362px) 100vw, 362px\" \/><\/a><br \/><b>&nbsp;<\/b><\/p>\n<h4><b>Euclidean Distance (L2 norm):<\/b><\/h4>\n<p><b>&nbsp;<\/b><br \/><span style=\"font-weight: 400\" data-mce-style=\"font-weight: 400;\">The most common metric for continuous quantities. It&#8217;s the &#8220;ordinary&#8221; straight-line distance between two points in Euclidean space.<\/span><br \/><b>&nbsp;<\/b><br \/><a href=\"https:\/\/skillioma.com\/learn\/wp-content\/uploads\/2023\/10\/Euclidean.png\" data-mce-href=\"https:\/\/skillioma.com\/learn\/wp-content\/uploads\/2023\/10\/Euclidean.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-12504\" src=\"https:\/\/skillioma.com\/learn\/wp-content\/uploads\/2023\/10\/Euclidean.png\" alt=\"\" width=\"410\" height=\"89\" data-mce-src=\"https:\/\/skillioma.com\/learn\/wp-content\/uploads\/2023\/10\/Euclidean.png\" srcset=\"https:\/\/skillioma.com\/learn\/wp-content\/uploads\/2023\/10\/Euclidean.png 410w, https:\/\/skillioma.com\/learn\/wp-content\/uploads\/2023\/10\/Euclidean-300x65.png 300w, https:\/\/skillioma.com\/learn\/wp-content\/uploads\/2023\/10\/Euclidean-220x48.png 220w\" sizes=\"(max-width: 410px) 100vw, 410px\" \/><\/a><br \/><b>&nbsp;<\/b><br \/><b>Business Scenarios:<\/b><br \/><b>&nbsp;<\/b><br \/><b>E-commerce Recommendations:<\/b><span style=\"font-weight: 400\" data-mce-style=\"font-weight: 400;\"> If you want to suggest products to a user based on their browsing history, you might use distance metrics to find products that are &#8220;close&#8221; to what they&#8217;ve looked at or purchased in the past.<\/span><\/p>\n<p><b>Real Estate Pricing:<\/b><span style=\"font-weight: 400\" data-mce-style=\"font-weight: 400;\"> When determining the price of a house, you might consider the Euclidean distance to key landmarks or Manhattan distance if you&#8217;re considering city blocks to essential facilities like schools, hospitals, etc.<\/span><\/p>\n<p><b>Supply Chain Optimization:<\/b><span style=\"font-weight: 400\" data-mce-style=\"font-weight: 400;\"> If you&#8217;re routing delivery trucks, Manhattan distance might be more appropriate in urban settings where you&#8217;re constrained by a grid of streets.<\/span><\/p>\n<p><b>Fraud Detection in Banking:<\/b><span style=\"font-weight: 400\" data-mce-style=\"font-weight: 400;\"> By examining transactions in a multi-dimensional space (where dimensions could be amount, frequency, merchant category, etc.), you might identify unusual (i.e., distant from typical) transactions using a distance metric.<\/span><\/p>\n<p><b>Clustering Customers for Market Segmentation:<\/b><span style=\"font-weight: 400\" data-mce-style=\"font-weight: 400;\"> Using clustering algorithms like K-means, which inherently use distance metrics, can help in segmenting customers based on their purchase behaviour, demographic information, etc.<\/span><\/p>\n<p><b>&nbsp;<\/b><br \/><span style=\"font-weight: 400\" data-mce-style=\"font-weight: 400;\">When choosing a distance metric for a business problem, consider the nature of your data and what &#8220;distance&#8221; would mean contextually. For instance, in a city with a grid-like structure, Manhattan distance might be more representative of actual distances people must travel, while in a more continuous space, Euclidean might be more appropriate.<\/span><\/p>\n","protected":false},"comment_status":"open","ping_status":"closed","template":"","class_list":["post-12453","lesson","type-lesson","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/skillioma.com\/learn\/wp-json\/wp\/v2\/lesson\/12453","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skillioma.com\/learn\/wp-json\/wp\/v2\/lesson"}],"about":[{"href":"https:\/\/skillioma.com\/learn\/wp-json\/wp\/v2\/types\/lesson"}],"replies":[{"embeddable":true,"href":"https:\/\/skillioma.com\/learn\/wp-json\/wp\/v2\/comments?post=12453"}],"wp:attachment":[{"href":"https:\/\/skillioma.com\/learn\/wp-json\/wp\/v2\/media?parent=12453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}