Contents

# What is the Minkowski Distance?

Mathematically:

Given two points p and q with coordinates (p_{1}, p_{2}, … , p_{n}) and (q_{1}, q_{2}, … , q_{n}) and an order p, the Minkowski distance between both vectors are defined as:

Where |x| represents the norm of vector x.

Properties:

- Positivity

d(p,q) > 0 if p ≠q and d(p,p) = 0.

- Symmetry

d(p,q) = d(q,p).

- Triangle inequality

d(p,q) ≤ d(p,r) + d(r,q).

A distance that satisfies these properties is a metric. Thus, the Minkowski distance is a metric for n ≥ 1, but not when n <1 because the triangle inequality is not valid in this case.

### How is the Minkowski Distance Useful?

In machine learning, it is widespread to use the Minkowski distance in those algorithms that make use of this concept to find the optimal correlation or to classify data. This is because it is straightforward to consider the order as one or two and thus, use the Manhattan or the Euclidean distance, according to the different needs. Some algorithms that consider distance in their calculations are K-Nearest Neighbors, Learning Vector Quantization (LVQ), Self-Organizing Map (SOM), and K-Means Clustering.

### Minkowski Distance and LogicPlum

LogicPlum’s platform is an automated tool for machine learning. As such, it uses algorithms, including the K-Nearest Neighbors, Learning Vector Quantization (LVQ), Self-Organizing Map (SOM), and K-Means Clustering.

Moreover, the main advantages of this platform are speed and accuracy. As the training and testing of the different algorithms are done automatically, the platform can check different distance definitions in a short time and, after testing them, choose the most efficient solution.

###### Additional Resources

- Coursera and the University of Illinois at Urbana-Champaign.
*Cluster Analysis in Data Mining. Minkowski Distance.*Available athttps://www.coursera.org/lecture/cluster-analysis/2-2-distance-on-numeric-data-minkowski-distance-CsCMY - Sharma, P.(2020).
*4 Types of Distance Metrics in Machine Learning*Available athttps://www.analyticsvidhya.com/blog/2020/02/4-types-of-distance-metrics-in-machine-learning/