FitkNN(CLEg) | R Documentation |
kNN classification
FitkNN(X, y, Xt, yt, k = 1)
X |
design matrix, training sample |
y |
binary response vector of 1 and -1 |
Xt |
design matrix, test sample |
yt |
binary response vector of 1 and -1 |
k |
number of nearest neighbours |
list with two components: misclassification rates and confusion matricies for both the training and test samples.
AIM