
Last chance! 50% off unlimited learning
Sale ends in
Creates a multivariate normal (also called Gaussian) distribution parameterized by a mean vector and a covariance matrix.
distr_multivariate_normal(
loc,
covariance_matrix = NULL,
precision_matrix = NULL,
scale_tril = NULL,
validate_args = NULL
)
(Tensor): mean of the distribution
(Tensor): positive-definite covariance matrix
(Tensor): positive-definite precision matrix
(Tensor): lower-triangular factor of covariance, with positive-valued diagonal
Bool wether to validate the arguments or not.
The multivariate normal distribution can be parameterized either
in terms of a positive definite covariance matrix
Distribution for details on the available methods.
Other distributions:
distr_bernoulli()
,
distr_chi2()
,
distr_gamma()
,
distr_normal()
,
distr_poisson()
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`
}
Run the code above in your browser using DataLab