Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

torch_mvlgamma

Mvlgamma


Description

Mvlgamma

Usage

torch_mvlgamma(self, p)

Arguments

self

(Tensor) the tensor to compute the multivariate log-gamma function

p

(int) the number of dimensions

mvlgamma(input, p) -> Tensor

Computes the multivariate log-gamma function <https://en.wikipedia.org/wiki/Multivariate_gamma_function>_) with dimension p element-wise, given by

\log(Γ_{p}(a)) = C + \displaystyle ∑_{i=1}^{p} \log≤ft(Γ≤ft(a - \frac{i - 1}{2}\right)\right)

where C = \log(π) \times \frac{p (p - 1)}{4} and Γ(\cdot) is the Gamma function.

All elements must be greater than \frac{p - 1}{2}, otherwise an error would be thrown.

Examples

if (torch_is_installed()) {

a = torch_empty(c(2, 3))$uniform_(1, 2)
a
torch_mvlgamma(a, 2)
}

torch

Tensors and Neural Networks with 'GPU' Acceleration

v0.3.0
MIT + file LICENSE
Authors
Daniel Falbel [aut, cre, cph], Javier Luraschi [aut], Dmitriy Selivanov [ctb], Athos Damiani [ctb], Christophe Regouby [ctb], Krzysztof Joachimiak [ctb], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.