"src/vscode:/vscode.git/clone" did not exist on "fb8d2eb7fcb9337631140bcf216b935118e36f6b"
scipy_spatial_distance.rst 1.29 KB
Newer Older
root's avatar
root committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
.. module:: cupyx.scipy.spatial.distance

Distance computations (:mod:`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.

.. Hint:: `SciPy API Reference: Spatial distance routines (scipy.spatial.distance) <https://docs.scipy.org/doc/scipy/reference/spatial.distance.html>`_


Distance matrix computations
----------------------------

Distance matrix computation from a collection of raw observation vectors stored in a rectangular array.

.. autosummary::
   :toctree: generated/

   pdist
   cdist
   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.

.. autosummary::
   :toctree: generated/

   minkowski
   canberra
   chebyshev
   cityblock
   correlation
   cosine
   hamming
   euclidean
   jensenshannon
   russellrao
   sqeuclidean
   hellinger
   kl_divergence