medpy.metric.histogram.chebyshev#

medpy.metric.histogram.chebyshev(h1, h2)[source]#

Chebyshev distance.

Also Tchebychev distance, Maximum or \(L_{\infty}\) metric; equal to Minowski distance with \(p=+\infty\). For the case of \(p=-\infty\), use chebyshev_neg.

The Chebyshev distance between two histograms \(H\) and \(H'\) of size \(m\) is defined as:

\[d_{\infty}(H, H') = \max_{m=1}^M|H_m-H'_m|\]

Attributes:

  • semimetric (triangle equation satisfied?)

Attributes for normalized histograms:

  • \(d(H, H')\in[0, 1]\)

  • \(d(H, H) = 0\)

  • \(d(H, H') = d(H', H)\)

Attributes for not-normalized histograms:

  • \(d(H, H')\in[0, \infty)\)

  • \(d(H, H) = 0\)

  • \(d(H, H') = d(H', H)\)

Attributes for not-equal histograms:

  • not applicable

Parameters:
h1sequence

The first histogram.

h2sequence

The second histogram.

Returns:
chebyshevfloat

Chebyshev distance.