R6 class for normal-block model with unknown Q (number of groups)
Source:R/model_selection.R
selection_n_clusters.Rd
R6 class for normal-block model with unknown Q (number of groups)
R6 class for normal-block model with unknown Q (number of groups)
Public fields
best_models
list of models explored so far indexed by the cluster sizes
ICL_explored
list of ICL reached so far, indexed by the cluster sizes
n_clusters_range
the range of the cluster sizes to browse
control
store the list of user-defined model settings and optimization parameters
Methods
Method new()
Explores and selects the optimal number of classes
Usage
selection_n_clusters$new(
mydata,
n_clusters_range,
zero_inflation = FALSE,
sparsity = 0,
control = NB_control()
)
Arguments
mydata
object of NBData class, with responses and design matrix
n_clusters_range
a size-2 vector with the range of cluster size to browse
zero_inflation
whether the models in the collection should be zero-inflated or not
sparsity
sparsity penalty on the network density
control
structured list of more specific parameters, to generate with NB_control
Method fit()
perform model selection with forward/backward exploration with split and merge strategy
Method train_best_candidates()
perform model selection with forward/backward exploration with split and merge strategy
Method plot()
Display the ICL for all the best models explored per number of cluster, and the winner