PRTools Contents

PRTools User Guide

testk

TESTK

Error estimation of the K-NN rule

    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

Description

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.