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

distr_gamma

Creates a Gamma distribution parameterized by shape concentration and rate.


Description

Creates a Gamma distribution parameterized by shape concentration and rate.

Usage

distr_gamma(concentration, rate, validate_args = NULL)

Arguments

concentration

(float or Tensor): shape parameter of the distribution (often referred to as alpha)

rate

(float or Tensor): rate = 1 / scale of the distribution (often referred to as beta)

validate_args

whether to validate arguments or not.

See Also

Distribution for details on the available methods.

Other distributions: distr_bernoulli(), distr_chi2(), 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

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.