knn_cuda: K-Nearest Neighbor Classification using CUDA

Description Usage Arguments Value

View source: R/kmcudaR.R

Description

k-nearest neighbor classification using a NVIDIA GPU via CUDA backend

Usage

1
2
knn_cuda(k, samples, centroids, assignments, metric = "L2", device = 0,
  verbosity = 0)

Arguments

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

Value

Integer matrix with neighbor indices of shape [nsamp, k].


kmcudaR documentation built on May 2, 2019, 9:17 a.m.

Related to knn_cuda in kmcudaR...