Creates a Gamma distribution parameterized by shape concentration and rate.
Source: R/distributions-gamma.R
distr_gamma.RdCreates a Gamma distribution parameterized by shape concentration and rate.
See also
Distribution for details on the available methods.
Other distributions:
distr_bernoulli(),
distr_chi2(),
distr_multivariate_normal(),
distr_normal(),
distr_poisson()
Examples
if (torch_is_installed()) {
m <- distr_gamma(torch_tensor(1.0), torch_tensor(1.0))
m$sample() # Gamma distributed with concentration=1 and rate=1
}
#> torch_tensor
#> 1.0726
#> [ CPUFloatType{1} ]