hellinger {dad} | R Documentation |
Hellinger distance between Gaussian densities
Description
Hellinger distance between two multivariate (p > 1
) or univariate (p = 1
) Gaussian densities (see Details).
Usage
hellinger(x1, x2, check = FALSE)
Arguments
x1 |
a matrix or data frame of |
x2 |
matrix or data frame (or tibble) of |
check |
logical. When |
Details
The Hellinger distance between the two Gaussian densities is computed by using the hellingerpar
function and the density parameters estimated from samples.
Value
Returns the Hellinger
distance between the two probability densities.
Be careful! If check = FALSE
and one smoothing bandwidth matrix is degenerate, the result returned can not be considered.
Author(s)
Rachid Boumaza, Pierre Santagostini, Smail Yousfi, Gilles Hunault, Sabine Demotes-Mainard
References
McLachlan, G.J. (1992). Discriminant analysis and statistical pattern recognition. John Wiley & Sons, New York .
See Also
hellingerpar: Hellinger distance between Gaussian densities, given their parameters.
Examples
require(MASS)
m1 <- c(0,0)
v1 <- matrix(c(1,0,0,1),ncol = 2)
m2 <- c(0,1)
v2 <- matrix(c(4,1,1,9),ncol = 2)
x1 <- mvrnorm(n = 3,mu = m1,Sigma = v1)
x2 <- mvrnorm(n = 5, mu = m2, Sigma = v2)
hellinger(x1, x2)