Collection of Normal-Block-Var Models over Cluster Counts and Sparsity Levels
Source:R/NormalBlockVarCollectionClustersSparsity.R
NormalBlockVarCollectionClustersSparsity.RdR6 class for a collection of normal-block models with different number of clusters (q) and different sparsity levels, i.e. one NormalBlockVarCollectionSparsity per q.
Super classes
NormalBlockCollection -> NormalBlockCollectionClustersSparsity -> NormalBlockVarCollectionClustersSparsity
Examples
ex <- generate_normal_block_var_data(n = 50, p = 20, d = 1, q = 3)
data <- NormalBlockData$new(ex$Y, ex$X)
models <- normal_block(data, blocks = 2:3, sparsity = TRUE,
control = NB_control(verbose = FALSE, n_sparsity_penalties = 3))
models$get_best_model("BIC")$q
#> [1] 3