trqwe_KNN: Fast binary KNN classifier

Description Usage Arguments Value

View source: R/my_functions.r

Description

Fast binary KNN classifier

Usage

1
trqwe_KNN(distmat, train_idx, test_idx, classes, K, mc.cores = 1)

Arguments

distmat

A NxN pre-computed distance matrix

train_idx

Train indicies

test_idx

Test indicies

classes

vector length N, 1 or 0

K

Number of nearest neighbors parameter

mc.cores

Number of threads to use

Value

A prediction vector for the test set based on the class labels of the train set.


traversc/trqwe documentation built on Dec. 4, 2020, 4:21 a.m.