hell: Calculate Hellinger distance

hellR Documentation

Calculate Hellinger distance

Description

The Hellinger distance (H) between two probability measures ranges from 0 (identical distributions) to 1 (non-overlapping distributions).

Usage

hell(d1, d2, a = NULL, b = NULL)

Arguments

d1, d2

A density distribution.

a, b

The lower and upper limits of comparison. Each density will be rescaled such that the integral over the interval [a,b] sums to unity. If empty, the minimum and maximum of the intersection of d1$x and d2$x will be used.

Details

Let f(x) and g(x) be the probability density functions for comparison. The squared Hellinger distance is 0.5 \int( \sqrt{f(x)} - \sqrt{g(x)} )^2 dx. Conveniently for numeric integration, the expression can be written as the integral of a product instead of a difference: 1 - \int \sqrt{f(x)g(x)} dx. H is related to the Bhattacharyya coefficient BC: H = \sqrt{1 - BC}. Elsewhere, Hellinger distances are sometimes reported as the square (H^2) (e.g. Warren et al. 2008, Di Cola et al. 2017), or are not rescaled and so range from 0 to \sqrt 2 (Encyclopedia of Mathematics).

Value

A numeric value between 0 and 1 inclusive.

References

\insertRef

DiCola17kerneval

\insertRef

Nikulin01kerneval

\insertRef

Warren08kerneval


GwenAntell/kerneval documentation built on July 21, 2023, 6:23 p.m.