Description Usage Arguments Value Examples
View source: R/mmpca_clust_modelselection.R
A wrapper on mmpca_clust
() to perform model
selection with an Integrated Classification Likelihood (ICL) criterion.
1 2 3 4 5 6 7 8 9 10 11 12 13  mmpca_clust_modelselect(
dtm,
Qs,
Ks,
Yinit = "random",
method = "BBCVEM",
init.beta = "lda",
keep = 1L,
max.epochs = 10L,
verbose = 1L,
nruns = 5L,
mc.cores = (detectCores()  1)
)

dtm 
an NxV 
Qs 
The vector of clusters to be tested. 
Ks 
The number of topics to be tested. 
Yinit 
Parameter for the initialization of Y. It can be either:

method 
The clustering algorithm to be used. Only "BBCVEM" is available : it corresponds to the branch and bound CVEM of the original article. 
init.beta 
Parameter for the initialization of the matrix beta. It can be either:

keep 
The evolution of the bound is tracked every 
max.epochs 
Specifies the maximum number of pass allowed on the whole dataset. 
verbose 
verbosity level. 
nruns 
number of runs of the algorithm for each (K,Q) pair (default to 1) : the run achieving the best evidence lower bound is selected. 
mc.cores 
The number of CPUs to use when fitting in parallel the different models. Default is the number of available cores minus 1. 
An object of class "mmpcaClust"
containing the best selected model.
A matrix containing the value of the ICL for each pair (K,Q).
1 2 3 4 5 6 7 8 9 10 11 12 13 14  ## generate data with the BBCmsg
simu = simulate_BBC(N = 100, L = 250)
## Define a grid
Qs = 5:6
Ks = 3:4
## Run model selection with MoMPCA
res < mmpca_clust_modelselect(simu$dtm.full, Qs = Qs, Ks = Ks,
Yinit = 'kmeans_lda',
init.beta = 'lda',
method = 'BBCVEM',
max.epochs = 7,
nruns = 2,
verbose = 1,
mc.cores = 2)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.