Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Matlab Coding for MNIST data set. Please Help! In class, we mentioned the MNIST data set of handwritten digits. You can obtain it from: http://yann.lecun.com/exdb/mnist/index.html

Matlab Coding for MNIST data set. Please Help!

image text in transcribed

In class, we mentioned the MNIST data set of handwritten digits. You can obtain it from: http://yann.lecun.com/exdb/mnist/index.html In this problem, you will build a classifier for this data by modeling each class as a probability distribution. (a) Upon downloading the data, you should have two training files (one with images, one with labels) and two test files. Unzip them. Load the data into MATLAB (you can use any other platform that you are familiar with including Python) The MNIST database contains 60,000 training images and 10,000 testing images. Four files are available on this site: train-images-idx3-ubyte.gz: training set images (9912422 bytes) train-labels-idxl-ubyte.gz: training set labels (28881 bytes) t10k-images-idx3-ubyte.gz: test set images (1648877 bytes) t10k-labels-idx1-ubyte.gz: test set labels (4542 bytes) (b) Model each class using Bernoulli distribution. Use all of the training images. Determine the class probabilities: what fraction to of the training points are digit 0, for instance? Call these values ro, ..., 19. Fit a Bernoulli density Pj(x) to each digit. You can classify test images using Bayes' rule: simply pick the digit for which TjPj(x) is largest. (c) Turn in: All your code. Error rate on the MNIST test set. Out of the misclassified test digits, pick five at random and display them. For each instance, list the posterior probabilities Pr(y x) of each of the ten classes. In class, we mentioned the MNIST data set of handwritten digits. You can obtain it from: http://yann.lecun.com/exdb/mnist/index.html In this problem, you will build a classifier for this data by modeling each class as a probability distribution. (a) Upon downloading the data, you should have two training files (one with images, one with labels) and two test files. Unzip them. Load the data into MATLAB (you can use any other platform that you are familiar with including Python) The MNIST database contains 60,000 training images and 10,000 testing images. Four files are available on this site: train-images-idx3-ubyte.gz: training set images (9912422 bytes) train-labels-idxl-ubyte.gz: training set labels (28881 bytes) t10k-images-idx3-ubyte.gz: test set images (1648877 bytes) t10k-labels-idx1-ubyte.gz: test set labels (4542 bytes) (b) Model each class using Bernoulli distribution. Use all of the training images. Determine the class probabilities: what fraction to of the training points are digit 0, for instance? Call these values ro, ..., 19. Fit a Bernoulli density Pj(x) to each digit. You can classify test images using Bayes' rule: simply pick the digit for which TjPj(x) is largest. (c) Turn in: All your code. Error rate on the MNIST test set. Out of the misclassified test digits, pick five at random and display them. For each instance, list the posterior probabilities Pr(y x) of each of the ten classes

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MFDBS 91 3rd Symposium On Mathematical Fundamentals Of Database And Knowledge Base Systems Rostock Germany May 6 9 1991

Authors: Bernhard Thalheim ,Janos Demetrovics ,Hans-Detlef Gerhardt

1991st Edition

3540540091, 978-3540540090

More Books

Students also viewed these Databases questions

Question

10. Describe the relationship between communication and power.

Answered: 1 week ago