Base Class for a Collection over Cluster Counts and Sparsity Levels
Source:R/NormalBlockCollectionClustersSparsity.R
NormalBlockCollectionClustersSparsity.RdShared 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.
Super class
NormalBlockCollection -> NormalBlockCollectionClustersSparsity
Methods
NormalBlockCollectionClustersSparsity$new()
Create a collection over a range of q, sorted increasingly, with a sparsity path for each q.
Usage
NormalBlockCollectionClustersSparsity$new(
mydata,
q_list,
zero_inflation = FALSE,
control = NB_control()
)NormalBlockCollectionClustersSparsity$get_model()
returns a collection of models corresponding to given q or one single model if penalty is also given
NormalBlockCollectionClustersSparsity$get_best_model()
Extract best model in the collection
Usage
NormalBlockCollectionClustersSparsity$get_best_model(
crit = c("ICL", "BIC", "EBIC")
)NormalBlockCollectionClustersSparsity$plot()
Plot one criterion as a heatmap over q and the penalty
(see also plot.NormalBlockCollection()).
Usage
NormalBlockCollectionClustersSparsity$plot(
criterion = c("deviance", "ICL", "BIC", "EBIC"),
n_intervals = NULL
)Arguments
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
Returns
a ggplot2::ggplot heatmap