optimize_initial_csmoothEM.RdRuns several initialization methods (via parallel_initial_csmoothEM),
each for num_iter warm-start iterations, then selects the best fit.
Selection criterion:
If adaptive == "ml", selects the fit with the largest ml_last
(collapsed objective \(\mathcal{C}\)).
Otherwise, selects the fit with the largest elbo_last.
If plot=TRUE, plots traces across methods and highlights the selected best method.
When adaptive=="ml", the primary plot shows ml_trace; otherwise it shows
elbo_trace. If two_panel=TRUE, a second panel shows loglik_trace.
optimize_initial_csmoothEM(
X,
methods = c("PCA", "tSNE", "random", "fiedler", "pcurve"),
num_iter = 5,
num_cores = 2,
K = NULL,
adaptive = "prior",
lambda_min = 1e-08,
lambda_max = 1e+08,
sigma_update = c("mstep", "ml"),
sigma_min = 1e-10,
sigma_max = 1e+10,
plot = FALSE,
two_panel = FALSE,
seed = NULL,
quiet = TRUE,
...
)Numeric matrix (n x d).
Character vector of initialization methods. Default includes
"PCA", "tSNE", "random", "fiedler", "pcurve", "isomap".
Integer \(\ge 1\). Number of warm-start iterations to run per method.
Integer \(\ge 1\). Number of cores to use (see parallel_initial_csmoothEM).
Optional integer \(\ge 2\). Number of mixture components. If NULL,
the default logic in initialize_csmoothEM is used.
Character. One of "none", "prior", "ml".
Logical values are accepted for backward compatibility: TRUE is treated as
"prior" and FALSE as "none".
Positive bounds for lambda_vec when adaptive!="none".
Character. Only used when adaptive="ml" (passed through).
Either "mstep" or "ml".
Positive bounds for sigma2 when adaptive="ml" and
sigma_update="ml".
Logical; if TRUE, plot traces across methods.
Logical; if TRUE, also plot penalized objective traces in a second panel.
Optional integer seed. If provided, a different derived seed is used per method.
Logical; reserved for future use.
Additional arguments passed to initialize_csmoothEM (and downstream ordering routines).
A csmooth_em object corresponding to the selected best method.
The returned object has an additional meta$initial_search list containing:
best_method: selected method name
criterion: selection criterion ("ml_last" or "elbo_last")
summary: the per-method summary data.frame
fits: the full named list of fits
options: options used for the search