View source: R/NormalBlockCollection-S3methods.R
| plot.NormalBlockCollection | R Documentation |
Plots the model-selection criteria of a collection of normal-block models: against the number of clusters q for a collection over q (NormalBlockVarCollectionClusters, NormalBlockMeanCollectionClusters), against the penalty for a sparsity path (NormalBlockVarCollectionSparsity, NormalBlockMeanCollectionSparsity), with a dashed line at the model selected by each criterion; as a heatmap over q and the penalty for a collection over both (NormalBlockVarCollectionClustersSparsity, NormalBlockMeanCollectionClustersSparsity).
## S3 method for class 'NormalBlockCollection'
plot(x, ...)
x |
An object inheriting from NormalBlockCollection. |
... |
passed to the collection's |
Invisibly returns the ggplot2::ggplot object; called for its side effect of plotting.
ex_data <- generate_normal_block_var_data(n = 50, p = 20, d = 1, q = 3)
data <- NormalBlockData$new(ex_data$Y, ex_data$X)
models <- normal_block(data, blocks = 2:5, control = NB_control(verbose = FALSE))
plot(models)
plot(models, criteria = c("BIC", "ICL"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.