hyperparam.J {ClusTorus}R Documentation

Selecting optimal number of mixture components based on various criteria

Description

hyperparam.J evaluates criterion for each icp.torus objects, and select the optimal number of mixture components based on the evaluated criterion.

Usage

hyperparam.J(data, icp.torus.objects, option = c("risk", "AIC", "BIC"))

Arguments

data

n x d matrix of toroidal data on [0, 2π)^d or [-π, π)^d

icp.torus.objects

a list whose elements are icp.torus objects, generated by icp.torus.score.

option

a string one of "risk", "AIC", or "BIC", which determines the criterion for the model selection. "risk" is based on the negative log-likelihood, "AIC" for the Akaike Information Criterion, and "BIC" for the Bayesian Information Criterion.

Value

returns a list object which contains a data.frame for the evaluated criterion corresponding to each number of components, the optimal number of components, and the corresponding icp.torus object.

References

Akaike (1974), "A new look at the statistical model identification", Schwarz, Gideon E. (1978), "Estimating the dimension of a model"

See Also

icp.torus.score, hyperparam.torus, hyperparam.alpha

Examples


data <- toydata2[, 1:2]
n <- nrow(data)
split.id <- rep(2, n)
split.id[sample(n, floor(n/2))] <- 1
Jvec <- 3:35
icp.torus.objects <- list()
for (j in Jvec){
  icp.torus.objects[[j]] <- icp.torus.score(data, split.id = split.id, method = "kmeans",
                                            kmeansfitmethod = "ge", init = "h",
                                            param = list(J = j), verbose = TRUE)
}
hyperparam.J(data, icp.torus.objects, option = "risk")


[Package ClusTorus version 0.1.3 Index]