View source: R/cavi_generic_functions.R
gaussian_outer_product_expectation | R Documentation |
Computes the expected value of the outer product of the D-dimensional Gaussian random variable.
gaussian_outer_product_expectation( expected_value, covariance_matrix = NULL, precision_matrix = NULL, perform_checks = TRUE )
expected_value |
A real-valued vector length L. The expected value of the Gaussian random variable. |
covariance_matrix |
Either a L \times L covariance matrix or NULL if the precision matrix is available instead. The covariance matrix for the Gaussian random variable. |
precision_matrix |
Either a L \times L precision matrix or NULL if the covariance matrix has been provided.. The precision matrix for the Gaussian random variable. |
perform_checks |
Logical. Check if function inputs are specified correctly. |
A symmetric L \times L matrix.
D <- 5 z <- rnorm(D) S <- stats::rWishart(1, df = D, Sigma = diag(D)/ D^2)[, , 1] gaussian_outer_product_expectation(expected_value = z, covariance_matrix = S)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.