Knn classification on a mnist image dataset

Hi i have this mnist jpg numbers of 1 to 5 every pic has 1100 pic of number in 16*16 pixel and the gray scale in every pixel is 0-255 dataset and i want to do knn classify the first half of data must be for training and second half is for test and i also want to find accuracy of performance of this classification and showing the number of wrong and true classifications with confusion matrix. Any one can help me with this .please.

5 Comments

It says the zip file is invalid. Try again. What features from the images will you be putting in to knnsearch()? You have to have column vectors of features and then one column vector that gives the class that it is. Just the image itself as a feature would not be good obviously because all the pixels from one particular mnist image are all the same class.
I was able to open the zip file and attached the individual files. Open usps_2.jpg to see the 1100 samples of hand lettering of the number 2. The intent seems to be to use a portion of the samples for training and the remaining to test.
@image Analyst ,pat gipper explained it in details well.
Doesn't MATLAB have a deep learning demo that uses the mnist image set? I seem to remember seeing something like that using deep learning but not KNN.
Ummm....can you answer this question too https://www.mathworks.com/matlabcentral/answers/706058-knn-classification-on-a-dataset?s_tid=srchtitle

Sign in to comment.

Answers (0)

Asked:

on 2 Jan 2021

Commented:

on 4 Jan 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!