Description
We should implement a weighted version of the Minkowski distance directly in the MinkowskiDistance
class itself consistently with scipy's formulation:
https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.distance.minkowski.html
which is different from the old:
https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.distance.wminkowski.html
which is already implemented inWMinkowskiDistance
.
Note that #21741 targeted for 1.0.2 does a minimal fix for DistanceMetric.get_metric("minkowski", p, w)
to do the right think automatically as stopgap compatibility fix to get scipy 1.8 support for scikit-learn 1.0.2 but the long term, maitenance fix is to refactor this to deprecate WMinkowskiDistance
completely in scikit-learn 1.1.
See the discussion in #21741 (comment) for more details.