R6 class for normal-block model with unknown Q (number of groups)
Source:R/NB_unknown_Q_changing_sparsity_collection_class.R
NB_unknown_Q_changing_sparsity.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
models
list of NB_fixed_Q models corresponding to each nb_block value
control
store the list of user-defined model settings and optimization parameters
Active bindings
Q_list
number of blocks
criteria
a data frame with the values of some criteria ((approximated) log-likelihood, BIC, ICL) for the collection of models
sparsity
list of penalties used for each Q
who_am_I
a method to print what model is being fitted
Methods
Method new()
Create a new [`NB_unknown_Q_changing_sparsity`] object.
Usage
NB_unknown_Q_changing_sparsity$new(
mydata,
Q_list,
zero_inflation = FALSE,
control = NB_control()
)
Method optimize()
optimizes an NB_changing_sparsity object for each penalty value
Usage
NB_unknown_Q_changing_sparsity$optimize(
control = list(niter = 100, threshold = 1e-04, verbose = TRUE)
)
Method get_model()
returns a collection of NB_unknown models corresponding to given Q or one single model if penalty is also given
Method get_best_model()
Extract best model in the collection
Usage
NB_unknown_Q_changing_sparsity$get_best_model(crit = c("ICL", "BIC", "EBIC"))
Method plot()
Display various outputs (goodness-of-fit criteria, robustness, diagnostic) associated with a collection of network fits (a [`Networkfamily`])
Usage
NB_unknown_Q_changing_sparsity$plot(
criterion = c("deviance", "ICL", "BIC", "EBIC"),
n_intervals = NULL
)