Error estimation of the K-NN rule
E = TESTK(A,K,T)
Tests a dataset T on the training dataset A using the K-NN rule and returns the classification error E. In case no set T is provided, the leave-one-out error estimate on A is returned.
The advantage of using TESTK over TESTC is that it enables leave-one-out error estimation. However, TESTK is based on just counting errors and does not weight with testobject priors.