do_csmoothEM_ml_collapsed.RdIteration order (collapsed-ML):
1) E-step: update responsibilities using current (MAP) \(\mu\).
2) Hyper-step: update \(\pi\), \(\lambda\), and optionally \(\sigma^2\).
3) M-step: update MAP \(\mu\) given current responsibilities and hyperparameters.
4) Record: penalized observed objective (loglik_trace), penalized ELBO
(elbo_trace), collapsed objective \(\mathcal{C}\) (ml_trace),
and logdetH_trace.
do_csmoothEM_ml_collapsed(
object,
data = NULL,
iter = 1,
record = TRUE,
lambda_min = NULL,
lambda_max = NULL,
sigma_update = c("mstep", "ml"),
sigma_min = 1e-10,
sigma_max = 1e+10,
verbose = FALSE
)A csmooth_em object.
Optional n-by-d data matrix. If NULL, uses object$data.
Integer >= 1 number of iterations.
Logical; if TRUE, record traces.
Bounds for lambda optimization.
Either "mstep" (standard M-step update) or "ml" (optimize collapsed objective).
Bounds for sigma2 when sigma_update="ml".
Logical.
Updated csmooth_em object.
The recorded ml_trace is the collapsed objective
$$\mathcal{C} \;=\; \text{penELBO} \;+\; \frac{dK}{2}\log(2\pi) \;-\; \frac12 \log|H|,$$
where \(H\) is the Hessian/precision w.r.t. \(\mu\) (block-diagonal over coordinates).