ellip.kmeans.torus {ClusTorus}R Documentation

K-Means Clustering to K-Spheres Clustering on Torus


ellip.kmeans.torus prepares the parameters for conformity scores which are derived by k-means clustering on torus.


  centers = 10,
  type = c("homogeneous-circular", "heterogeneous-circular", "ellipsoids", "general"),
  init = c("kmeans", "hierarchical"),
  d = NULL,
  additional.condition = TRUE,
  THRESHOLD = 1e-10,
  maxiter = 200,
  verbose = TRUE,



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


either the number of clusters or a set of initial cluster centers. If a number, a random set of row in x is chosen as the initial centers.


character which must be "homogeneous-circular", "heterogeneous-circular", or "general". If "homogeneous-circular", the radii of k-spheres are identical. If "heterogeneous-circular", the radii of k-spheres may be different. If "ellipsoids", cluster with k-ellipsoids without optimized parameters. If, "general", clustering with k-ellipsoids. The parameters to construct the ellipses are optimized with elliptical k-means algorithm, which is modified for toroidal space. See references for the detail. Default is "homogeneous-circular".


determine the initial parameter for option "general". Must be "kmeans" or "hierarchical". If "kmeans", the initial parameters are obtained with extrinsic kmeans method. If "hierarchical", the initial parameters are obtained with hierarchical clustering method. Default is "hierarchical".


pairwise distance matrix(dist object) for init = "hierarchical", which used in hierarchical clustering. If init = "hierarchical" and d = NULL, d will be automatically filled with ang.pdist(data).


boolean index. If TRUE, a singular matrix will be altered to the scalar identity.


number of threshold for difference between updating and updated parameters. Default is 1e-10.


the maximal number of iteration. Default is 200.


boolean index, which indicates whether display additional details as to what the algorithm is doing or how many loops are done. Default is TRUE.


Further arguments for argument init. If init = "kmeans", these are for kmeans. If init = "hierarchical", there are for hclust.


returns a list, containing all values which determines the shape and location of spheres.


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

Mardia, K. V., Kent, J. T., Zhang, Z., Taylor, C. C., & Hamelryck, T. (2012). Mixtures of concentrated multivariate sine distributions with applications to bioinformatics. Journal of Applied Statistics, 39(11), 2475-2492.

Shin, J., Rinaldo, A., & Wasserman, L. (2019). Predictive clustering. arXiv preprint arXiv:1903.08125.

See Also



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

ellip.kmeans.torus(data, centers = 3, type = "general", init = "hierarchical")

[Package ClusTorus version 0.2.2 Index]