R6 abstract class for the Normal-Block models where the clustering structures the mean (mu_i = C B' X_i).
Super class
NormalBlockBase -> NormalBlockMeanBase
Active bindings
model_para list with the matrices of the model parameters: B (covariates), dm1 (species variance), Omega (groups precision matrix)). On the internal fitting scale (`self$data$Y`, possibly column-rescaled by `NormalBlockData(scale = TRUE)`): use `$B_original`/`$dm1_original` for the same quantities converted back to Y's original units.
nb_paramnumber of parameters in the model
sparsity_weights(weights associated to each pair of groups)
Methods
Inherited methods
NormalBlockMeanBase$new()
Create a new [`NormalBlockMeanBase`] object.
Usage
NormalBlockMeanBase$new(
data,
q,
sparsity = 0,
control = NB_control(),
zero_inflation = FALSE
)Arguments
dataobject of NormalBlockData class, with responses and design matrix
qnumber of block/cluster
sparsitysparsity penalty on the network density
controlstructured list of more specific parameters, to generate with NB_Mean_control
zero_inflationwhether the concrete subclass models zero-inflation; set by the ZI subclasses themselves, not meant to be set by the end user.
NormalBlockMeanBase$predict()
Predicts observations Y for new covariates X, in Y's original units. The mean-block mean is mu_i = C B' X_i, so the cluster-level predictor has to be mapped back to the variables through C.
NormalBlockMeanBase$warm_start_from()
Seed this model's starting parameters from another, already-optimized model with the same q, instead of the heuristic clustering-derived values set at construction time. Used by [split()]/[merge()].
NormalBlockMeanBase$split()
Create a clone of the current [`NormalBlockMeanBase`] object after splitting cluster `index`. Unlike the variance-block family, Omega and the sparsity weights are p x p here and do not depend on q, so they carry over unchanged; only C (tau) and B (one column per cluster) are affected. Variables are split by their current noise variance (1 / diag(Omega)) around its within-cluster median, the same criterion [NormalBlockVarBase]'s `split()` uses via `dm1`, since `diag(Omega)` plays the same per-variable-precision role here.
NormalBlockMeanBase$merge()
Create a clone of the current [`NormalBlockMeanBase`] object after merging clusters `indices`