This repository contains a solution for an exercise from Bayesian Reasoning and Machine Learning book chapter 14.
Exercise 14.1. The file NNdata.mat contains training and test data for the handwritten digits 5 and 9. Using leave one out cross-validation, find the optimal K in K-nearest neighbors, and use this to compute the classification accuracy of the method on the test data.
For more details read this article: http://emaraic.com/blog/handwritten-digit-classification
Running code on octave (Video)