View source: R/gen-namespace.R
torch_mvlgamma | R Documentation |
Mvlgamma
torch_mvlgamma(self, p)
self |
(Tensor) the tensor to compute the multivariate log-gamma function |
p |
(int) the number of dimensions |
Computes the multivariate log-gamma function <https://en.wikipedia.org/wiki/Multivariate_gamma_function>
_) with dimension
p
element-wise, given by
\log(\Gamma_{p}(a)) = C + \displaystyle \sum_{i=1}^{p} \log\left(\Gamma\left(a - \frac{i - 1}{2}\right)\right)
where C = \log(\pi) \times \frac{p (p - 1)}{4}
and \Gamma(\cdot)
is the Gamma function.
All elements must be greater than \frac{p - 1}{2}
, otherwise an error would be thrown.
if (torch_is_installed()) {
a = torch_empty(c(2, 3))$uniform_(1, 2)
a
torch_mvlgamma(a, 2)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.