Description Usage Arguments Value
k-nearest neighbor classification using a NVIDIA GPU via CUDA backend
1 2 |
k |
The number of neighbors to search for each sample |
samples |
Numeric matrix |
centroids |
Numeric matrix with precalculated clusters' centroids |
assignments |
integer vector with sample-cluster associations. Indices start from 1. |
metric |
character name of the 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. |
device |
integer defining device to use. 1 = first device, 2 = second device, 3 = first & second devices, 0 = use all devices. Default = 0 |
verbosity |
Integer indicating amount of output to see. 0 = silence, 1 = progress logging, 2 = all output |
Integer matrix with neighbor indices of shape [nsamp, k].
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.