Base Class for a Collection of Normal-Block Models
Source:R/NormalBlockVarCollection.R
NormalBlockVarCollection.RdShared scaffolding for the collections explored by [get_model()]/ [normal_block()]: a sweep over sparsity penalties ([`NormalBlockVarCollectionSparsity`]), over the number of clusters ([`NormalBlockVarCollectionClusters`]), or over both ([`NormalBlockVarCollectionClustersSparsity`]). Concrete subclasses set `private$progress_field`/`private$progress_label` in their `initialize()` and provide their own `get_best_model()`, delegating the (row of `self$criteria` minimizing a criterion) lookup to `private$best_id()`.
Public fields
modelslist of models (or sub-collections) explored by the collection
controlstore the list of user-defined model settings and optimization parameters
Active bindings
criteriaa data frame with the values of some criteria for the collection of models
logliknot defined for a collection (which of its models?) – accessing it raises an informative error instead of silently returning `NULL`. Use `logLik()` for every model's log-likelihood, or `$get_best_model()$loglik` for a single one.
Methods
NormalBlockVarCollection$optimize()
optimizes every model (or sub-collection) in the collection
Usage
NormalBlockVarCollection$optimize(
control = list(niter = 500, threshold = 1e-04, verbose = TRUE)
)NormalBlockVarCollection$print()
User-friendly print method: model type and the range of q/sparsity explored. See `summary()` for the full criteria table.
NormalBlockVarCollection$summary()
Summarize the collection: model type, full criteria table, and the range of q/sparsity explored.