hyperparam.torus {ClusTorus}R Documentation

Selecting optimal hyperparameters for the conformal prediction set

Description

hyperparam.torus selects optimal hyperparameters for constructing the conformal prediction set, based on the type of postulated model and the criterion.

Usage

hyperparam.torus(
  icp.torus.objects,
  option = NULL,
  alphavec = NULL,
  alpha.lim = NULL,
  eval.point = NULL
)

## S3 method for class 'hyperparam.torus'
plot(x, color = "auto", ...)

Arguments

icp.torus.objects

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

option

A string. One of "elbow", "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. "elbow" is based on minimizing the criterion used in Jung et. al.(2021). Default is option = "elbow" for 2-dimensional cases and option = "risk" for d(>2)-dimensional cases.

alphavec

either a scalar or a vector, or even NULL for the levels. Default value is NULL. If NULL, then alphavec is automatically generated as a sequence from 0 to alpha.lim.

alpha.lim

a positive number lower than 1. Default value is NULL. If NULL, then alpha.vec is is 0.5 for option = "elbow", and 0.15 for options c("risk", "AIC", or "BIC").

eval.point

N x N numeric matrix on [0, 2\pi)^2. Default input is grid.torus.

x

hyperparam.torus object

color

A string for plotting hyperparam.torus object, whose criterion option is option = "elbow". One of "auto", "sequential", or "qualitative". If color = "auto", color assignment will be done automatically based on the number of J or concentration. If color = "sequential", color assignment will be done by regarding each J or concentration as quantitative variable. If color = "qualitative", color assignment will be done by regarding each J or concentration as qualitative variable. Default is color = "auto".

...

additional parameter for ggplot2::ggplot()

Value

returns a list object which contains data.frame objects for the evaluated criterion corresponding to each hyperparameter, selected hyperparameters based on the designated criterion, and an icp.torus object based the selected hyperparameters.

References

Jung, S., Park, K., & Kim, B. (2021). Clustering on the torus by conformal prediction. The Annals of Applied Statistics, 15(4), 1583-1603.

Akaike, H. (1974). A new look at the statistical model identification. IEEE transactions on automatic control, 19(6), 716-723.

Schwarz, G. (1978). Estimating the dimension of a model. The annals of statistics, 461-464.

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 <- icp.torus(data, split.id = split.id, model = "kmeans",
                                      kmeansfitmethod = "ge", init = "h",
                                      J = Jvec, verbose = TRUE)
hyperparam.torus(icp.torus.objects, option = "risk")


[Package ClusTorus version 0.2.2 Index]