Parameters: |
-
X : {array-like, sparse matrix}, shape (n_samples1, n_features) -
Array containing points. -
Y : {array-like, sparse matrix}, shape (n_samples2, n_features) -
Arrays containing points. -
axis : int, optional, default 1 -
Axis along which the argmin and distances are to be computed. -
metric : string or callable, default ‘euclidean’ -
metric to use for distance computation. Any metric from scikit-learn or scipy.spatial.distance can be used. If metric is a callable function, it is called on each pair of instances (rows) and the resulting value recorded. The callable should take two arrays as input and return one value indicating the distance between them. This works for Scipy’s metrics, but is less efficient than passing the metric name as a string. Distance matrices are not supported. Valid values for metric are: - from scikit-learn: [‘cityblock’, ‘cosine’, ‘euclidean’, ‘l1’, ‘l2’, ‘manhattan’]
- from scipy.spatial.distance: [‘braycurtis’, ‘canberra’, ‘chebyshev’, ‘correlation’, ‘dice’, ‘hamming’, ‘jaccard’, ‘kulsinski’, ‘mahalanobis’, ‘minkowski’, ‘rogerstanimoto’, ‘russellrao’, ‘seuclidean’, ‘sokalmichener’, ‘sokalsneath’, ‘sqeuclidean’, ‘yule’]
See the documentation for scipy.spatial.distance for details on these metrics. -
batch_size : integer -
Deprecated since version 0.20: Deprecated for removal in 0.22. Use sklearn.set_config(working_memory=…) instead. -
metric_kwargs : dict, optional -
Keyword arguments to pass to specified metric function. |