Normal-Block-Var Model with Unknown Clustering
Source:R/NormalBlockVarUnknownClusters.R
NormalBlockVarUnknownClusters.RdR6 class for a normal-block model with a fixed number of clusters (but unknown clustering).
Super classes
NormalBlockBase -> NormalBlockVarBase -> NormalBlockVarUnknownClusters
Active bindings
model_parthe parameters of NormalBlockVarBase (B, B0, dm1, Omega), plus alpha (cluster proportions)
var_para list with the matrices of the variational parameters: M (means), S (variances), tau (posterior group probabilities)
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$predict()NormalBlockBase$print()NormalBlockBase$update()NormalBlockBase$warm_start_from()NormalBlockVarBase$merge()NormalBlockVarBase$split()NormalBlockVarBase$within_block_correlations()
NormalBlockVarUnknownClusters$new()
Create a new NormalBlockVarUnknownClusters object.
Usage
NormalBlockVarUnknownClusters$new(
data,
q,
sparsity = 0,
control = NB_control()
)Examples
ex <- generate_normal_block_var_data(n = 50, p = 20, d = 1, q = 3)
data <- NormalBlockData$new(ex$Y, ex$X)
model <- normal_block(data, blocks = 3, control = NB_control(verbose = FALSE))
model$clustering
#> [1] 1 1 2 1 3 2 2 1 2 1 1 3 2 3 1 2 2 2 2 1