PRTools contents |
TESTK
E = TESTK(A,K,T)
Input | |
A | Training dataset |
K | Number of nearest neighbors (default 1) |
T | Test dataset (default [], i.e. find leave-one-out estimate on A) |
Output | |
E | Estimated error of the K-NN rule |
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.
datasets, knnc, knn_map, testc,
PRTools contents |