compute_loading_elbo: Loading ELBO

View source: R/cavi_loading.R

compute_loading_elboR Documentation

Loading ELBO

Description

Compute the contribution of the loading matrix Evidence Lower Bound (ELBO) of a PLVM given the approximate posterior distribution for loadings, the prior correlation matrix, and ARD precision hyperparameters.

Usage

compute_loading_elbo(
  loading_expectation,
  loading_row_covariance,
  ard_precision,
  loading_prior_correlation_log_det = NULL,
  inv_loading_prior_correlation = NULL,
  loading_prior_correlation = NULL,
  perform_checks = TRUE
)

Arguments

loading_expectation

A D'xL matrix of real numbers, The expected loading matrix.

loading_row_covariance

A LxLxD' array. The covariance of each row of the loading matrix under the approximate posterior distribution.

ard_precision

An L-dimensional vector of real numbers. The ARD precision hyper-parameters on the columns of the loading matrix.

loading_prior_correlation_log_det

A real valued scalar. The log determinant of the loading prior correlation matrix.

inv_loading_prior_correlation

A D'xD' matrix. The inverse of the loading prior correlation matrix.

loading_prior_correlation

A D'xD' matrix. The loading prior correlation matrix.

perform_checks

Logical. Check if function inputs are specified correctly.

Value

A real valued scalar. The contribution of the loading matrix to the ELBO under the approximate posterior distribution.


jpmeagher/vbar documentation built on Nov. 22, 2022, 5:48 a.m.