Description Usage Arguments Value Author(s) See Also Examples
Given training data and test examples, the kNN predictions for the test data are produced. The tuning parameter k is automatically selected by specifying one of the methods: LOOCV, MLE or NN.
1 |
dfTr |
dataframe with last column for the output. The output must be a factor. |
dfTe |
dataframe for test data. Must have columns corresponding to the training columns except the test output is not needed. |
method |
One of the automatic methods for selecting k, the number of nearest neighbours. The default is LOOCV. |
k |
Pre-specified k but this value of k is only used when method="NN" otherwise when method="LOOCV" or method="MLE", k is estimated. |
The mis-classification rate (cost) and correlation of prediction and test.
A. I. McLeod
yh_C50
,
yh_CART
,
yh_RF
,
yh_svm
,
yh_NB
,
yh_lda
,
yh_logistic
,
yh_qda
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.