diststudent function

Distance/Divergence between Centered Multivariate tt Distributions

Distance/Divergence between Centered Multivariate tt Distributions

Computes the distance or divergence (Renyi divergence, Bhattacharyya distance or Hellinger distance) between two random vectors distributed according to multivariate tt distributions (MTD) with zero mean vector.

diststudent(nu1, Sigma1, nu2, Sigma2, dist = c("renyi", "bhattacharyya", "hellinger"), bet = NULL, eps = 1e-06)

Arguments

  • nu1: numeric. The degrees of freedom of the first distribution.
  • Sigma1: symmetric, positive-definite matrix. The correlation matrix of the first distribution.
  • nu2: numeric. The degrees of freedom of the second distribution.
  • Sigma2: symmetric, positive-definite matrix. The correlation matrix of the second distribution.
  • dist: character. The distance or divergence used. One of "renyi" (default), "battacharyya" or "hellinger".
  • bet: numeric, positive and not equal to 1. Order of the Renyi divergence. Ignored if distance="bhattacharyya" or distance="hellinger".
  • eps: numeric. Precision for the computation of the partial derivative of the Lauricella DD-hypergeometric function (see Details). Default: 1e-06.

Returns

A numeric value: the divergence between the two distributions, with two attributes attr(, "epsilon") (precision of the result of the Lauricella DD-hypergeometric function,see Details) and attr(, "k") (number of iterations).

Details

Given X1X_1, a random vector of Rp\mathbb{R}^p distributed according to the MTD with parameters (ν1,0,Σ1)(\nu_1, \mathbf{0}, \Sigma_1)

and X2X_2, a random vector of Rp\mathbb{R}^p distributed according to the MTD with parameters (ν2,0,Σ2)(\nu_2, \mathbf{0}, \Sigma_2).

Let δ1=ν1+p2β\delta_1 = \frac{\nu_1 + p}{2} \beta, δ2=ν2+p2(1β)\delta_2 = \frac{\nu_2 + p}{2} (1 - \beta)

and λ1,,λp\lambda_1, \dots, \lambda_p the eigenvalues of the square matrix Σ1Σ21\Sigma_1 \Sigma_2^{-1}

sorted in increasing order:

λ1<<λp1<λp \lambda_1 < \dots < \lambda_{p-1} < \lambda_p

The Renyi divergence between X1X_1 and X2X_2 is:

DRβ(X1X1)=1β1[βln(Γ(ν1+p2)Γ(ν22)ν2p2Γ(ν2+p2)Γ(ν12)ν1p2)+ln(Γ(ν2+p2)Γ(ν22))+ln(Γ(δ1+δ2p2)Γ(δ1+δ2))β2i=1plnλi+lnFD] \begin{aligned}D_R^\beta(\mathbf{X}_1||\mathbf{X}_1) & = & \displaystyle{\frac{1}{\beta - 1} \bigg[ \beta \ln\left(\frac{\Gamma\left(\frac{\nu_1+p}{2}\right) \Gamma\left(\frac{\nu_2}{2}\right) \nu_2^{\frac{p}{2}}}{\Gamma\left(\frac{\nu_2+p}{2}\right) \Gamma\left(\frac{\nu_1}{2}\right) \nu_1^{\frac{p}{2}}}\right) + \ln\left(\frac{\Gamma\left(\frac{\nu_2+p}{2}\right)}{\Gamma\left(\frac{\nu_2}{2}\right)}\right) + \ln\left(\frac{\Gamma\left(\delta_1 + \delta_2 - \frac{p}{2}\right)}{\Gamma(\delta_1 + \delta_2)}\right) } \\&& \displaystyle{- \frac{\beta}{2} \sum_{i=1}^p{\ln\lambda_i} + \ln F_D \bigg]}\end{aligned}

with FDF_D given by:

  • If ν1ν2λ11\displaystyle{\frac{\nu_1}{\nu_2} \lambda_1 \> 1}:

    c("\n\n", "displaystyleFD=FD(p)bigg(delta1,underbracefrac12,dots,frac12p;delta1+delta2;1fracnu2nu1lambda1,dots,1fracnu2nu1lambdapbigg)\n\\displaystyle{ F_D = F_D^{(p)}{\\bigg( \\delta_1, \\underbrace{\\frac{1}{2}, \\dots, \\frac{1}{2}}_p; \\delta_1+\\delta_2; 1-\\frac{\\nu_2}{\\nu_1 \\lambda_1}, \\dots, 1-\\frac{\\nu_2}{\\nu_1 \\lambda_p} \\bigg)} }\n")

  • If ν1ν2λp\<1\displaystyle{\frac{\nu_1}{\nu_2} \lambda_p \< 1}:

    c("\n\n", "displaystyleFD=prodi=1pleft(fracnu1nu2lambdairight)frac12FD(p)bigg(delta2,underbracefrac12,dots,frac12p;delta1+delta2;1fracnu1nu2lambda1,dots,1fracnu1nu2lambdapbigg)\n\\displaystyle{ F_D = \\prod_{i=1}^p{\\left(\\frac{\\nu_1}{\\nu_2} \\lambda_i\\right)^{\\frac{1}{2}}} F_D^{(p)}\\bigg(\\delta_2, \\underbrace{\\frac{1}{2}, \\dots, \\frac{1}{2}}_p; \\delta_1+\\delta_2; 1-\\frac{\\nu_1}{\\nu_2}\\lambda_1, \\dots, 1-\\frac{\\nu_1}{\\nu_2}\\lambda_p\\bigg) }\n")

  • If ν1ν2λ1\<1\displaystyle{\frac{\nu_1}{\nu_2} \lambda_1 \< 1} and ν1ν2λp1\displaystyle{\frac{\nu_1}{\nu_2} \lambda_p \> 1}:

    c("\n\n", "\\displaystyle{ F_D = \\left(\\frac{\\nu_2}{\\nu_1} \\frac{1}{\\lambda_p}\\right)^{\\delta_2} \\prod_{i=1}^p\\left(\\frac{\\nu_1}{\\nu_2}\\lambda_i\\right)^\\frac{1}{2} F_D^{(p)}\\bigg(\\delta_2, \\underbrace{\\frac{1}{2}, \\dots, \\frac{1}{2}}_p, \\delta_1+\\delta_2-\\frac{p}{2}; \\delta_1+\\delta2; 1-\\frac{\\lambda_1}{\\lambda_p}, \\dots, 1-\\frac{\\lambda_{p-1}}{\\lambda_p}, 1-\\frac{\\nu_2}{\\nu_1}\\frac{1}{\\lambda_p}\\bigg) }\n")

where FD(p)F_D^{(p)} is the Lauricella DD-hypergeometric function defined for pp variables:

FD(p)(a;b1,...,bp;g;x1,...,xp)=m10...mp0(a)m1+...+mp(b1)m1...(bp)mp(g)m1+...+mpx1m1m1!...xpmpmp! \displaystyle{ F_D^{(p)}\left(a; b_1, ..., b_p; g; x_1, ..., x_p\right) = \sum\limits_{m_1 \geq 0} ... \sum\limits_{m_p \geq 0}{ \frac{ (a)_{m_1+...+m_p}(b_1)_{m_1} ... (b_p)_{m_p} }{ (g)_{m_1+...+m_p} } \frac{x_1^{m_1}}{m_1!} ... \frac{x_p^{m_p}}{m_p!} } }

Its computation uses the lauricella function.

The Bhattacharyya distance is given by:

DB(X1X2)=12DR1/2(X1X2) D_B(\mathbf{X}_1||\mathbf{X}_2) = \frac{1}{2} D_R^{1/2}(\mathbf{X}_1||\mathbf{X}_2)

And the Hellinger distance is given by:

DH(X1X2)=1exp(12DR1/2(X1X2)) D_H(\mathbf{X}_1||\mathbf{X}_2) = 1 - \exp{\left(-\frac{1}{2} D_R^{1/2}(\mathbf{X}_1||\mathbf{X}_2)\right)}

Examples

nu1 <- 2 Sigma1 <- matrix(c(2, 1.2, 0.4, 1.2, 2, 0.6, 0.4, 0.6, 2), nrow = 3) nu2 <- 4 Sigma2 <- matrix(c(1, 0.3, 0.1, 0.3, 1, 0.4, 0.1, 0.4, 1), nrow = 3) # Renyi divergence diststudent(nu1, Sigma1, nu2, Sigma2, bet = 0.25) diststudent(nu2, Sigma2, nu1, Sigma1, bet = 0.25) # Bhattacharyya distance diststudent(nu1, Sigma1, nu2, Sigma2, dist = "bhattacharyya") diststudent(nu2, Sigma2, nu1, Sigma1, dist = "bhattacharyya") # Hellinger distance diststudent(nu1, Sigma1, nu2, Sigma2, dist = "hellinger") diststudent(nu2, Sigma2, nu1, Sigma1, dist = "hellinger")

References

N. Bouhlel and D. Rousseau (2023), Exact Rényi and Kullback-Leibler Divergences Between Multivariate t-Distributions, IEEE Signal Processing Letters. tools:::Rd_expr_doi("10.1109/LSP.2023.3324594")

Author(s)

Pierre Santagostini, Nizar Bouhlel

  • Maintainer: Pierre Santagostini
  • License: GPL (>= 3)
  • Last published: 2024-12-20