function [misclassify, index] = louerror(sampledata, k) %LOUERROR Leave-one-out error (misclassification count) % [MISCLASSIFY, INDEX] = LOUERROR(SAMPLEDATA, K, OPTION) % MISCLASSIFY: no. of misclassification points % INDEX: index of misclassification points % K: the "k" in k-nearest neighbor rule % SAMPLEDATA: sample data set, with the last column being % the desired label % Roger Jang, June-28-1997