PRTools contents

PRTools manual

knnc

KNNC

K-Nearest Neighbor Classifier

    [W,K,E] = KNNC(A,K)
    [W,K,E] = KNNC(A)

Input
 A Dataset
 K Number of the nearest neighbors (optional; default: K is  optimized with respect to the leave-one-out error on A)

Output
 W k-NN classifier
 K Number of the nearest neighbors used
 E The leave-one-out error of the KNNC

Description

Computation of the K-nearest neighbor classifier for the dataset A.  The resulting classifier W is automatically evaluated by KNN_MAP.

Warning: class prior probabilities in A are neglected.

See also

mappings, datasets, knn_map,

PRTools contents

PRTools manual