Description Usage Arguments Value Author(s) References
K-nearest neighbors classifier. We'll automatically find the best parameter k for knn from RWeka.
1 | knn(train, test, k)
|
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. |
yhat A vector, prediction probabilities of testy equals to 1.
Yi Li, liyistat@gmail.com
Yi Li, Xiaoyu Liu, et al. knnAUC : k-nearest neighbors AUC test. BMC Bioinformatics. 2018.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.