cupyx.scipy.spatial.distance.hellinger#

cupyx.scipy.spatial.distance.hellinger(u, v)[source]#

Compute the Hellinger distance between two 1-D arrays.

The Hellinger distance is defined as

\[d(u, v) = \frac{1}{\sqrt{2}} \sqrt{ \sum_{i} (\sqrt{u_i} - \sqrt{v_i})^2}\]
Parameters:
  • u (array_like) – Input array of size (N,)

  • v (array_like) – Input array of size (N,)

Returns:

The Hellinger distance between vectors u and v.

Return type:

hellinger (double)