pred.kmeans.torus {ClusTorus}R Documentation

Prediction for Extrinsic Kmeans Clustering

Description

pred.kmeans.torus predicts the cluster for each data point.

Usage

pred.kmeans.torus(data, kmeans)

Arguments

data

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

kmeans

a kmeans object, which contains input data, cluster centers on torus, membership, total sum of squares, within cluster sum of squares, between cluster centers sum of squares, and the size of each cluster. See kmeans.torus

Value

a vector whose elements indicate the labels of predicted clusters.

References

'S. Jung, K. Park, and B. Kim (2021), "Clustering on the torus by conformal prediction"

See Also

kmeans.torus

Examples

data <- ILE[1:200, 1:2]

split.id <- sample(1:2, nrow(data), replace = TRUE)
data.train <- data[split.id == 1, ]
data.test <- data[split.id == 2, ]

kmeans <- kmeans.torus(data.train, centers = 2,
             iter.max = 100, nstart = 1)

pred.kmeans.torus(data.test, kmeans)

[Package ClusTorus version 0.1.3 Index]