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

distr_normal

Creates a normal (also called Gaussian) distribution parameterized by loc and scale.


Description

Creates a normal (also called Gaussian) distribution parameterized by loc and scale.

Usage

distr_normal(loc, scale, validate_args = NULL)

Arguments

loc

(float or Tensor): mean of the distribution (often referred to as mu)

scale

(float or Tensor): standard deviation of the distribution (often referred to as sigma)

validate_args

Additional arguments

Value

Object of torch_Normal class

See Also

Distribution for details on the available methods.

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

Examples

if (torch_is_installed()) {
m <- distr_normal(loc = 0, scale = 1)
m$sample()  # normally distributed with loc=0 and scale=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.