PRTools Contents

PRTools User Guide



Error estimation of the K-NN rule

    E = TESTK(A,K,T)

 A Training dataset
 K Number of nearest neighbors (default 1)
 T Test dataset (default [], i.e. find leave-one-out estimate on A)

 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.

See also

datasets, knnc, knn_map, testc,

PRTools Contents

PRTools User Guide

This file has been automatically generated. If badly readable, use the help-command in Matlab.