Distance computations (cupyx.scipy.spatial.distance
)#
Note
The distance
module uses pylibraft
as a backend.
You need to install pylibraft package <https://anaconda.org/rapidsai/pylibraft> from rapidsai
Conda channel to use features listed on this page.
Note
Currently, the distance
module is not supported on AMD ROCm platforms.
Distance matrix computations#
Distance matrix computation from a collection of raw observation vectors stored in a rectangular array.
|
Compute distance between observations in n-dimensional space. |
|
Compute distance between each pair of the two collections of inputs. |
|
Compute the distance matrix. |
Distance functions#
Distance functions between two numeric vectors u and v. Computing distances over a large collection of vectors is inefficient for these functions. Use cdist for this purpose.
|
Compute the Minkowski distance between two 1-D arrays. |
|
Compute the Canberra distance between two 1-D arrays. |
|
Compute the Chebyshev distance between two 1-D arrays. |
|
Compute the City Block (Manhattan) distance between two 1-D arrays. |
|
Compute the correlation distance between two 1-D arrays. |
|
Compute the Cosine distance between two 1-D arrays. |
|
Compute the Hamming distance between two 1-D arrays. |
|
Compute the Euclidean distance between two 1-D arrays. |
|
Compute the Jensen-Shannon distance between two 1-D arrays. |
|
Compute the Russell-Rao distance between two 1-D arrays. |
|
Compute the squared Euclidean distance between two 1-D arrays. |
|
Compute the Hellinger distance between two 1-D arrays. |
|
Compute the Kullback-Leibler divergence between two 1-D arrays. |