Weighted Minkowski Distance

Weighted norm

The weighted norm for a vector X = (x1, x2, …, xn) and weights W = (w1, w2, …, wn), where each wi ≥ 0 and wi > 0 for at least one i, is defined by

Weighted Lp normwhere w = the sum of the wi.

Weighted distance

The weighted Minkowski distance between vectors X and Y is ||XY||p,W.

If y is a scalar, then  ||X–y||p,W = ||X–Y||p,W where Y is the vector all of whose elements are y.

For any p, 1 ≤ p ≤ 2, we can define

Weighted Lp estimator

For p = 2, it turns out that Lp,W(X) is equal to the weighted mean. Similarly, for p = 1, Lp,W(X) is equal to the weighted median (see  Weighted Mean and Median).

See Lp Estimators for how to calculate the weighted Minkowski distance and weighted Lp,W(X) values in Excel.

References

Zornoza, J. (2020) Distance metric for machine learning. Aigents
https://aigents.co/data-science-blog/publication/distance-metrics-for-machine-learning

Wikipedia (2020) Minkowski distance
https://en.wikipedia.org/wiki/Minkowski_distance

Leave a Comment