Performs k-means clustering on a numeric matrix using a NVIDIA GPU via CUDA
kmeans_cuda(samples, clusters, tolerance = 0.01, init = "k-means++",
yinyang_t = 0.1, metric = "L2", average_distance = FALSE,
seed = NULL, device = 0L, verbosity = 0L)A numeric matrix
the number of clusters
if the relative number of reassignments drops below this value the algorithm stops
A character vector or numeric matrix, sets the method for centroids initialization. Options include "k-means++", "afk-mc2", "random" or numeric matrix of shape [clusters, number of features]. Default = "kmeans++"
numeric value defining relative number of cluster groups. Usually 0.1 but 0 disables Yinyang refinement.
Character vector specifying distance metric to use. The default is Euclidean (L2), it can be changed to "cos" for Sphereical K-means with angular distance. NOTE - the samples must be normalized in the latter case.
logical indicating whether to calculate the average distance between cluster elements and the corresponding centroids. Useful for finding the best 'K'. Returned as third list element
random generator seed for reproducible results [deprecated]
integer defining device to use. 1 = first device, 2 = second device, 3 = first & second devices, 0 = use all devices. Default = 0
Integer indicating amount of output to see. 0 = silence, 1 = progress logging, 2 = all output
a list consisting of
Cluster centroids
integer vector of sample-cluster associations
average distance between cluster elements