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

distr_chi2

Creates a Chi2 distribution parameterized by shape parameter df. This is exactly equivalent to distr_gamma(alpha=0.5*df, beta=0.5)


Description

Creates a Chi2 distribution parameterized by shape parameter df. This is exactly equivalent to distr_gamma(alpha=0.5*df, beta=0.5)

Usage

distr_chi2(df, validate_args = NULL)

Arguments

df

(float or torch_tensor): shape parameter of the distribution

validate_args

whether to validate arguments or not.

See Also

Distribution for details on the available methods.

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

Examples

if (torch_is_installed()) {
m <- distr_chi2(torch_tensor(1.0))
m$sample()  # Chi2 distributed with shape df=1
torch_tensor(0.1046)

}

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.