knn: K-nearest neighbors classifier

Description Usage Arguments Value Author(s) References

Description

K-nearest neighbors classifier. We'll automatically find the best parameter k for knn from RWeka.

Usage

1
knn(train, test, k)

Arguments

train

A training dataset containing both a continuous variable (X) and a binary (0 or 1) variable (Y).

test

A testing dataset containing both a continuous variable (X) and a binary (0 or 1) variable (Y).

k

A positive integer, we'll automatically find the best parameter for knn between 1 and number k.

Value

yhat A vector, prediction probabilities of testy equals to 1.

Author(s)

Yi Li, liyistat@gmail.com

References

Yi Li, Xiaoyu Liu, et al. knnAUC : k-nearest neighbors AUC test. BMC Bioinformatics. 2018.


liyistat/knnAUC documentation built on May 12, 2019, 10:51 a.m.