| NormalBlockCollectionClustersSparsity | R Documentation |
Shared scaffolding for NormalBlockVarCollectionClustersSparsity and NormalBlockMeanCollectionClustersSparsity: a collection of sparsity sub-collections, one per q in increasing order. Everything lives here (two-key model lookup, model selection over both axes, the criteria heatmap); subclasses only name the model family.
NormalBlockCollection -> NormalBlockCollectionClustersSparsity
q_listnumber of blocks
sparsitylist of penalties used for each q
NormalBlockCollectionClustersSparsity$new()Create a collection over a range of q, sorted increasingly, with a sparsity path for each q.
NormalBlockCollectionClustersSparsity$new( mydata, q_list, zero_inflation = FALSE, control = NB_control() )
mydataobject of NormalBlockData class, with responses and design matrix
q_listvalues of q (number of clusters) in the collection
zero_inflationwhether the models of the collection are zero-inflated
controlstructured list of parameters to handle sparsity control
A new collection object
NormalBlockCollectionClustersSparsity$get_model()returns a collection of models corresponding to given q or one single model if penalty is also given
NormalBlockCollectionClustersSparsity$get_model(q, sparsity = NA)
qnumber of blocks asked by user.
sparsitysparsity penalty asked by user
either a sparsity sub-collection or a single model object
NormalBlockCollectionClustersSparsity$get_best_model()Extract best model in the collection
NormalBlockCollectionClustersSparsity$get_best_model(
crit = c("ICL", "BIC", "EBIC")
)
crita character for the criterion used to performed the selection. Either "BIC", "EBIC" or "ICL". "ICL" is the default criterion
a single fitted model object
NormalBlockCollectionClustersSparsity$plot()Plot one criterion as a heatmap over q and the penalty
(see also plot.NormalBlockCollection()).
NormalBlockCollectionClustersSparsity$plot(
criterion = c("deviance", "ICL", "BIC", "EBIC"),
n_intervals = NULL
)
criterionthe criterion to plot, among "deviance" (the
default), "ICL", "BIC" and "EBIC".
n_intervalsnumber of intervals into which the range of the penalties is split
a ggplot2::ggplot heatmap
NormalBlockCollectionClustersSparsity$clone()The objects of this class are cloneable with this method.
NormalBlockCollectionClustersSparsity$clone(deep = FALSE)
deepWhether to make a deep clone.
# An internal abstract base class, never instantiated directly -- see
# normal_block() for how collections are created and fitted.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.