| elbo_functions | R Documentation |
Internal functions computing the six additive terms of the Evidence Lower Bound (ELBO), which serves as both the convergence criterion and the M-step objective in the VEM algorithm (da Cruz et al., 2024, eq. 36–42).
The per-curve terms (expectedLogLikelihood, elboInclusionTerm,
elboBetaTerm, elboThetaTerm) are summed over i=1,\ldots,m.
The global terms (elboSigmaPriorTerm, elboTauTerm) contribute once.
elbo_corr assembles all six terms into the total ELBO at fixed w.
elbo_omega wraps elbo_corr as a function of w alone,
passed to optim() as the M-step objective.
dev_elbo provides the analytic gradient \partial\text{ELBO}/\partial w,
passed to optim() to enable L-BFGS-B optimisation.
y |
List of observed curve vectors. |
ni |
Integer vector of per-curve sample sizes. |
B |
List of basis matrices. |
i |
Integer. Curve index (per-curve terms only). |
m |
Integer. Number of curves. |
K |
Integer. Number of basis functions. |
iter |
Integer. Current iteration index. |
delta_1, delta_2 |
Prior hyperparameters for |
lambda_1, lambda_2 |
Prior hyperparameters for |
delta1_q, delta2_values |
Shape and scale trajectory of |
lambda1_q, lambda2_values |
Shape and scale trajectory of |
mu_beta_values |
Matrix of posterior beta mean trajectories. |
Sigma_beta |
Array of posterior beta covariance matrices. |
a1_values, a2_values |
Shape parameter trajectories for |
prob_values |
Matrix of inclusion probability trajectories. |
mu_ki |
Scalar prior hyperparameter for |
psi |
Current correlation matrix |
w |
Positive scalar. Decay parameter ( |
Xt |
Numeric vector of evaluation points ( |
logdet_psi |
Pre-computed |
A numeric scalar.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.