| NB_control | R Documentation |
Control the model settings and various optimization parameters
NB_control(
niter = 500,
threshold = 1e-04,
fixed_point_niter = 5,
sparsity_weights = NULL,
sparsity_penalties = NULL,
n_sparsity_penalties = 30,
min_ratio = 0.01,
fixed_tau = FALSE,
clustering_init = NULL,
verbose = TRUE,
heuristic = FALSE,
noise_covariance = NULL,
refine = TRUE,
acceleration = NULL
)
niter |
maximal number of (V)EM iterations. |
threshold |
the (V)EM stops when the objective (log-likelihood or
ELBO) increases by less than this. A negative value runs exactly |
fixed_point_niter |
number of sweeps of the tau update for Normal-Block-Mean models with unknown clusters. Each sweep visits the rows of tau sequentially and maximizes the ELBO exactly in each, so it can never decrease the ELBO. |
sparsity_weights |
a symmetric matrix of weights applied to the penalty, entry by entry: q x q (variance-block) or p x p (mean-block). By default, 1 off the diagonal and 0 on it (the diagonal is not penalized). |
sparsity_penalties |
the penalties of a sparsity path ( |
n_sparsity_penalties |
number of penalties of the default path. |
min_ratio |
ratio between the smallest and the largest penalty of the default path. |
fixed_tau |
whether the posterior cluster probabilities stay at their
initial value ( |
clustering_init |
how to obtain the initial clustering of the q
unknown blocks: a heuristic name ("ward2", "kmeans", "sbm" or
"spectral"), an actual clustering (a vector of labels or a p x q indicator
matrix, or a list of either per q for a collection), or "best_of_inits" to
try several heuristics per model and keep the best-ELBO fit (see
NormalBlockBase's |
verbose |
whether to print the progress of the optimization. |
heuristic |
whether to use the heuristic approach (moment-based, no (V)EM
recursion) instead of the full (V)EM. Default is FALSE. In heuristic mode, no
likelihood/ELBO is computed, so |
noise_covariance |
shape of the residual covariance. Variance-block
models accept "diagonal" (variable-specific) or "spherical" (common);
mean-block models, whose Sigma is the full p x p residual covariance, also
accept "full". Default |
refine |
for collections over a range of cluster counts (both
families): whether |
acceleration |
whether the (V)EM is accelerated by SQUAREM
(Varadhan & Roland, 2008), an extrapolation built on two successive (V)EM
steps and accepted only if it does not lower the objective. Default |
A named list of parameters to pass to normal_block()'s control
argument.
ex_data <- generate_normal_block_var_data(n = 50, p = 20, d = 1, q = 3)
data <- NormalBlockData$new(ex_data$Y, ex_data$X)
## silent fits, without the split and merge search
ctrl <- NB_control(verbose = FALSE, refine = FALSE)
collection <- normal_block(data, blocks = 2:4, control = ctrl)
summary(collection)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.