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 model parameters: B (d x q, one profile per cluster) and Omega (p x p precision matrix of the residuals), on the scale of the fit (see
coef()andsigma()).fittedY values predicted by the model, in Y's original units:
X B C'(with the posterior cluster probabilities as C when the clustering is unknown), with the observed zeros of zero-inflated models set to 0sparsity_weights(weights associated to each pair of groups)
Methods
Inherited methods
NormalBlockBase$best_of_inits()NormalBlockBase$candidates_merge()NormalBlockBase$candidates_split()NormalBlockBase$heldout_loglik()NormalBlockBase$latent_network()NormalBlockBase$optimize()NormalBlockBase$plot()NormalBlockBase$plot_loglik()NormalBlockBase$plot_network()NormalBlockBase$print()NormalBlockBase$update()NormalBlockBase$warm_start_from()
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_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 the mean of Y for new covariates X, in Y's
original units: mu_i = C B' X_i, with the posterior cluster
probabilities as C when the clustering is unknown (as in fitted()).
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.
Arguments
indexindex (integer) of the cluster to split
in_placeshould the split be applied to the object itself, or should a copy be sent? Default FALSE (send a copy)
rulehow the members of the cluster are divided:
"kmeans"runs a 2-means on their fitted mean trajectoriesX B_ols;"noise"cuts them at the median of their noise variance1 / diag(Omega). DefaultNULL, i.e."noise"for this family.
NormalBlockMeanBase$merge()
Create a clone of the current NormalBlockMeanBase
object after merging clusters indices