
Wrapper function to generate k-means parameters
params_kmeans.RdWrapper function to generate k-means parameters
Arguments
- metric
String. Distance metric to use. One of
c("euclidean", "cosine"). Defaults to"euclidean".- max_iters
Integer. Maximum number of iterations. Defaults to
1000L.- batch_size
Integer. Mini-batch size. Only used when
method = "minibatch". Defaults to4096L.- drift_threshold
Numeric. Below which centroid drift the mini-batch k-means is considered converged. Only used when
method = "minibatch". Defaults to1e-04.- lr_alpha
Numeric. Learning rate decay for the mini-batch k-means. Original paper uses
1.0. Defaults to1.0.- init
String. The initialisation of the centroids. One of
c("parallel", "random"). Defaults to"parallel".- use_hamerly
Boolean or
NULL. Shall Hamerly's method be used (only ifmetric == "euclidean"). Defaults toNULL.- use_gemm
Boolean or
NULL. Shall the GEMM path be used. Useful on high dimensional data. IfNULL, choice will be based on heuristics. Defaults toNULL.
Value
A named list with the following elements:
metric - String. Distance metric to use. One of
c("euclidean", "cosine"). Defaults to"euclidean".max_iters - Integer. Maximum number of iterations. Defaults to
1000L.batch_size - Integer. Mini-batch size. Only used when
method = "minibatch". Defaults to4096L.drift_threshold - Numeric. Below which centroid drift the mini-batch k-means is considered converged. Only used when
method = "minibatch". Defaults to1e-04.lr_alpha - Numeric. Learning rate decay for the mini-batch k-means. Original paper uses
1.0. Defaults to1.0.init - String. The initialisation of the centroids. One of
c("parallel", "random"). Defaults to"parallel".use_hamerly - Boolean or
NULL. Shall Hamerly's method be used (only ifmetric == "euclidean"). Defaults toNULL.use_gemm - Boolean or
NULL. Shall the GEMM path be used. Useful on high dimensional data. IfNULL, choice will be based on heuristics. Defaults toNULL.