PRTools contents |
KNNC
[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 |
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.
PRTools contents |