Minkowski distance

The Minkowski distances are the set of distance metrics with different degree \((p > 0)\) and are widely used for distance computation in different algorithms. The most commonly used distance metric, Euclidean distance, is also a Minkowski distance with \(p = 2.0\).

Operation

Computational methods

dense

dense

Mathematical formulation

Computing

Given a set \(U\) of \(n\) feature vectors \(u_1 = (u_{11}, \ldots, u_{1k}), \ldots, u_n = (u_{n1}, \ldots, u_{nk})\) of dimension \(k\) and a set \(V\) of \(m\) feature vectors \(v_1 = (v_{11}, \ldots, v_{1k}), \ldots, v_m = (v_{m1}, \ldots, v_{mk})\) of dimension \(k\), the problem is to compute the Minkowski distance \(||u_i, v_j||_{p}\) for any pair of input vectors:

\[||u_i, v_j||_{p} = \sum_{l=1}^{k} {({|u_{il} - v_{jl}|}^p)}^{1/p},\]

where \(\quad 1 \leq i \leq n, \quad 1 \leq j \leq m, \quad p > 0\).

Computation method: dense

The method defines Minkowski distance metric, which is used in other algorithms for the distance computation. There are no separate computation mode to compute distance manually.

Programming Interface

Refer to API Reference: Minkowski distance.