model_selection | R Documentation |
Compares different models and return the best one selected according to criterion (BIC or AIC).
model_selection(y, layers, g, seeds = sample(.Machine$integer.max, 10), it = 50, eps = 0.001, init = "kmeans", init_est = "factanal", criterion = "BIC")
y |
A matrix or a data frame in which rows correspond to observations and columns to variables. |
layers |
The number of layers in the deep Gaussian mixture model. Admitted values are 1, 2 or 3. |
g |
The number of clusters. |
seeds |
Integer vector containing seeds to try. |
it |
Maximum number of EM iterations. |
eps |
The EM algorithm terminates the relative increment of the log-likelihod falls below this value. |
init |
Initial paritioning of the observations to determine initial parameter values. See Details. |
init_est |
To determine how the initial parameter values are computed. See Details. |
criterion |
Model selection criterion, either |
Compares different models and return the best one selected according to criterion (BIC or AIC). One can use diffefrent number of seeds.
A list containing
an object of class "dgmm"
containing fitted values
and list of BIC and AIC values.
Viroli, C. and McLachlan, G.J. (2019). Deep Gaussian mixture models. Statistics and Computing 29, 43-51.
y <- scale(mtcars) sel <- model_selection(y, layers = 2, g = 3, seeds = c(1, 2, 12334), it = 250, eps = 0.001, init = "kmeans", criterion = "BIC") sel summary(sel)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.