This page

Citing

Please consider citing the scikit-learn.

9.8.4.5. sklearn.metrics.pairwise.distance_metrics

sklearn.metrics.pairwise.distance_metrics()

Valid metrics for pairwise_distances

This function simply returns the valid pairwise distance metrics. It exists, however, to allow for a verbose description of the mapping for each of the valid strings.

The valid distance metrics, and the function they map to, are:
metric Function
‘cityblock’ sklearn.pairwise.manhattan_distances
‘euclidean’ sklearn.pairwise.euclidean_distances
‘l1’ sklearn.pairwise.manhattan_distances
‘l2’ sklearn.pairwise.euclidean_distances
‘manhattan’ sklearn.pairwise.manhattan_distances