medpy.metric.histogram.histogram_intersection_1#

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

Turns the histogram intersection similarity into a distance measure for normalized, positive histograms.

\[d_{\bar{\cos}}(H, H') = 1 - d_{\cap}(H, H')\]

See histogram_intersection for the definition of \(d_{\cap}(H, H')\).

Attributes:

  • semimetric

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:

  • not applicable

Attributes for not-equal histograms:

  • not applicable

Parameters:
h1sequence

The first histogram, normalized.

h2sequence

The second histogram, normalized, same bins as h1.

Returns:
histogram_intersectionfloat

Intersection between the two histograms.