sklearn.metrics.pairwise.distance_metrics()

sklearn.metrics.pairwise.distance_metrics

sklearn.metrics.pairwise.distance_metrics() [source]

Valid metrics for pairwise_distances.

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

The valid distance metrics, and the function they map to, are:

metric Function
‘cityblock’ metrics.pairwise.manhattan_distances
‘cos