sklearn.metrics.pairwise_distances_argmin(X, Y, axis=1, metric=’euclidean’, batch_size=None, metric_kwargs=None)
Compute minimum distances between one point and a set of points.
This function computes for each row in X, the index of the row of Y which is closest (according to the specified distance).
This is mostly equivalent to calling:pairwise_distances(X, Y=Y, metric=metric).argmin(axis=axis)
but uses much less memory, and is faster for large arrays.
This function works with dense 2D arrays only.
© 2007–2018 The scikit-learn developers
Licensed under the 3-clause BSD License.