scale_tril: (Tensor): lower-triangular factor of covariance, with positive-valued diagonal
validate_args: Bool wether to validate the arguments or not.
Details
The multivariate normal distribution can be parameterized either in terms of a positive definite covariance matrix Σ
or a positive definite precision matrix Σ−1
or a lower-triangular matrix L with positive-valued diagonal entries, such that Σ=LL⊤. This triangular matrix can be obtained via e.g. Cholesky decomposition of the covariance.
Note
Only one of covariance_matrix or precision_matrix or scale_tril can be specified. Using scale_tril will be more efficient: all computations internally are based on scale_tril. If covariance_matrix or precision_matrix is passed instead, it is only used to compute the corresponding lower triangular matrices using a Cholesky decomposition.
Examples
if(torch_is_installed()){m <- distr_multivariate_normal(torch_zeros(2), torch_eye(2))m$sample()# normally distributed with mean=`[0,0]` and covariance_matrix=`I`}
See Also
Distribution for details on the available methods.
Other distributions: distr_bernoulli(), distr_chi2(), distr_gamma(), distr_normal(), distr_poisson()