Zero-Inflated Mean-Block Model with Unknown Clustering
Source:R/ZINormalBlockMeanUnknownClusters.R
ZINormalBlockMeanUnknownClusters.RdR6 class for a zero-inflated Normal-Block-Mean model with a fixed number of clusters (but unknown clustering), inferred by variational EM. Sigma is diagonal or spherical here. See [NormalBlockMeanBase] for why a full one is out of reach under a mask.
Super classes
NormalBlockBase -> NormalBlockMeanBase -> ZINormalBlockMeanUnknownClusters
Active bindings
fittedY values predicted by the model, in Y's original units
var_para list with the variational parameter: tau (posterior group probabilities)
model_para list with model parameters: B, Omega and kappa (zero-inflation probabilities)
nb_paramnumber of parameters in the model
entropyEntropy of the conditional distribution
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$print()NormalBlockBase$update()NormalBlockMeanBase$merge()NormalBlockMeanBase$predict()NormalBlockMeanBase$split()NormalBlockMeanBase$warm_start_from()
ZINormalBlockMeanUnknownClusters$new()
Create a new [`ZINormalBlockMeanUnknownClusters`] object.
Usage
ZINormalBlockMeanUnknownClusters$new(
data,
q,
sparsity = 0,
control = NB_control()
)Examples
ex <- generate_normal_block_mean_data(n = 50, p = 20, d = 1, q = 3)
Y <- ex$Y; Y[runif(length(Y)) < 0.2] <- 0
data <- NormalBlockData$new(Y, ex$X)
model <- normal_block(data, blocks = 3, model = "mean", zero_inflation = TRUE)
#> Fitting a zero-inflated diagonal normal-block-mean model with unknown blocks
#>
#> DONE
model$clustering
#> [1] 1 2 2 1 3 1 1 2 3 2 2 1 3 2 1 2 3 2 1 1