Computes a Bayesian Information Criterion (BIC)-like score from the
Evidence Lower Bound (ELBO) of a fitted model. The penalty accounts for
the number of free parameters in a latent factor model with latent
dimension q:
$$ \mathrm{BIC} = \mathrm{ELBO} - \frac{\log(n)}{2}\Big[q\{p - (q-1)/2\} + p\,d\Big], $$
where \(n\) is the number of rows (sites/samples), \(p\) the number of
columns (species/variables), and \(d\) the number of covariates.
Details
This criterion mirrors the usual BIC structure but replaces the
log-likelihood with the ELBO and uses the parameter count appropriate
for a rank-q latent factor structure.