R6 abstract class for the sparse Normal-Block models, where the clustering structures the latent covariance.
Super class
NormalBlockBase -> NormalBlockVarBase
Active bindings
B_originalregression coefficients (d x p), converted back to Y's original units (undoing `NormalBlockData(scale = TRUE)`'s column-wise rescaling, if any). Use `model_par$B` instead for the coefficients on the internal fitting scale.
d0number of zi variables (dimensions in X0)
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)
dm1_originalinverse residual variance per variable (1 / Var(Y_j)), converted back to Y's original units. Use `model_par$dm1` instead for the internal fitting scale. With `noise_covariance = "spherical"`, `model_par$dm1` is a single value repeated p times; once converted back per-variable, the p values returned here generally differ from one another whenever Y's columns were rescaled by different factors.
Methods
Inherited methods
NormalBlockBase$best_of_inits()NormalBlockBase$candidates_merge()NormalBlockBase$candidates_split()NormalBlockBase$latent_network()NormalBlockBase$optimize()NormalBlockBase$plot()NormalBlockBase$plot_loglik()NormalBlockBase$plot_network()NormalBlockBase$predict()NormalBlockBase$print()NormalBlockBase$update()
NormalBlockVarBase$new()
Create a new [`NormalBlockVarBase`] object.
Usage
NormalBlockVarBase$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_control
zero_inflationwhether the concrete subclass models zero-inflation; set by the ZI subclasses themselves, not meant to be set by the end user. When `FALSE`, the (costly) zero-inflation probability fit (`kappa`/`B0`) is skipped entirely, since it would otherwise never be used downstream.
NormalBlockVarBase$warm_start_from()
Seed this model's starting parameters from another, already-optimized model with the same q, instead of a fresh heuristic clustering. Used by [NormalBlockVarCollectionSparsity] to warm-start each penalty in a sparsity path from the previous one's solution.
NormalBlockVarBase$split()
Create a clone of the current [`NormalBlockVarBase`] object after splitting cluster `cl` We split the cluster according to the species variances
NormalBlockVarBase$merge()
Create a clone of the current [`NormalBlockVarBase`] object after merging clusters `cl1` and `cl2`