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

distr_poisson

Creates a Poisson distribution parameterized by rate, the rate parameter.


Description

Samples are nonnegative integers, with a pmf given by

\mbox{rate}^{k} \frac{e^{-\mbox{rate}}}{k!}

Usage

distr_poisson(rate, validate_args = NULL)

Arguments

rate

(numeric, torch_tensor): the rate parameter

validate_args

whether to validate arguments or not.

See Also

Distribution for details on the available methods.

Other distributions: distr_bernoulli(), distr_chi2(), distr_gamma(), distr_normal()

Examples

if (torch_is_installed()) {
m <- distr_poisson(torch_tensor(4))
m$sample()
}

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.