Zero-Inflated Normal-Block Model with Unknown Clustering
Source:R/ZINormalBlockVarUnknownClusters.R
ZINormalBlockVarUnknownClusters.RdR6 class for a zero-inflated normal-block model with a fixed number of clusters (but unknown clustering).
Super classes
NormalBlockBase -> NormalBlockVarBase -> ZINormalBlockVarUnknownClusters
Public fields
fixed_tauwhether tau should be fixed at clustering_init during optimization, useful for stability selection
Active bindings
nb_paramnumber of parameters in the model
var_para list with variational parameters
model_para list with model parameters: B (covariates), dm1 (species variance), Omega (blocks precision matrix), kappa (zero-inflation probabilities)
entropyEntropy of the conditional distribution
fittedY values predicted by the model, in Y's original units
who_am_Ia method to print what model is being fitted
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$merge()NormalBlockVarBase$split()NormalBlockVarBase$warm_start_from()
ZINormalBlockVarUnknownClusters$new()
Create a new [`ZINormalBlockVarUnknownClusters`] object.
Usage
ZINormalBlockVarUnknownClusters$new(
data,
q,
sparsity = 0,
control = NB_control()
)Examples
ex <- generate_normal_block_var_data(n = 50, p = 20, d = 1, q = 3, kappa = rep(0.3, 20))
data <- NormalBlockData$new(ex$Y, ex$X)
model <- normal_block(data, blocks = 3, zero_inflation = TRUE,
control = NB_control(verbose = FALSE))
model$clustering
#> [1] 1 2 3 3 2 1 3 3 1 2 2 2 1 1 2 3 3 3 3 2