Learn R Programming

ClusTorus (version 0.2.2)

cp.torus.kde: Conformal prediction set indices with kernel density estimation

Description

cp.torus.kde computes conformal prediction set indices (TRUE if in the set) using kernel density estimation as conformity score.

Usage

cp.torus.kde(data, eval.point = grid.torus(), level = 0.1, concentration = 25)

# S3 method for cp.torus.kde plot(x, level.id = 1, ...)

Arguments

data

n x d matrix of toroidal data on \([0, 2\pi)^d\)

eval.point

N x N numeric matrix on \([0, 2\pi)^d\). Default input is NULL, which represents the fine grid points on \([0, 2\pi)^d\).

level

either a scalar or a vector, or even NULL. Default value is 0.1.

concentration

positive number which has the role of \(\kappa\) of von Mises distribution. Default value is 25.

x

cp.torus.kde object

level.id

an integer among 1:length(cp.torus$level).

...

additional parameter for ggplot2::ggplot()

Value

If level is NULL, then return kde at eval.point and at data points.

If level is a vector, return the above and prediction set indices for each value of level.

References

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

Di Marzio, M., Panzera, A., & Taylor, C. C. (2011). Kernel density estimation on the torus. Journal of Statistical Planning and Inference, 141(6), 2156-2173.

See Also

kde.torus, grid.torus

Examples

Run this code
# NOT RUN {
data <- ILE[1:200, 1:2]
cp.torus.kde(data, eval.point = grid.torus(),
             level = 0.05, concentration = 25)
# }

Run the code above in your browser using DataLab