kmeans.kspheres {ClusTorus} | R Documentation |
kmeans.kspheres
prepares the parameters for conformity scores
which are derived by k-means clustering on torus.
kmeans.kspheres( data, centers = 10, type = c("homogeneous-circular", "heterogeneous-circular", "ellipsoids", "general"), init = c("kmeans", "hierarchical"), additional.condition = TRUE, THRESHOLD = 1e-10, maxiter = 200, verbose = TRUE )
data |
data n x d matrix of toroidal data on [0, 2π)^d |
centers |
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. |
type |
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". |
init |
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". |
additional.condition |
boolean index.
If |
THRESHOLD |
number of threshold for difference between updating and updated parameters. Default is 1e-10. |
maxiter |
the maximal number of iteration. Default is 200. |
verbose |
boolean index, which indicates whether display
additional details as to what the algorithm is doing or
how many loops are done. Default is |
returns a sphere.param
object,
containing all values which determines the shape and
location of spheres.
S. Jung, K. Park, and B. Kim (2021), "Clustering on the torus by conformal prediction", and Jaehyeok Shin, Alessandro Rinaldo and Larry Wasserman (2019), "Predictive Clustering"
data <- ILE[1:200, 1:2] kmeans.kspheres(data, centers = 3, type = "general")