both generative and discriminative models to the MNIST dataset…

In this assignment, we’ll fit both generative and discriminative models to the MNIST dataset of handwritten numbers. Each datapoint in the MNIST dataset [http://yann.lecun.com/exdb/mnist/] is a 28×28 black-and-white image of a number in {0 . . . 9}, and a label indicating which number. MNIST is the ’fruit fly’ of machine learning – a simple standard problem useful for comparing the properties of different algorithms. Some code for handling MNIST is on the course webpage. You can use whichever programming language you like, and libraries for loading and plotting data. You’ll need to write your own initialization, fitting, and prediction code. You can use automatic differentiation in your code, but must still answer the gradient questions. For this assignment, we’ll binarize the dataset, converting the grey pixel values to either black or white (0 or 1) with > 0.5 being the cutoff. When comparing models, we’ll need a training and test set. Use the first 10000 samples for training, and another 10000 for testing. Hint: Also build a dataset of only 100 training samples to use when debugging, to make loading and training faster. Question 1 (Basic Na¨ive Bayes, 10 points) In this question, we’ll fit a na¨ive Bayes model to the MN

 

Looking for a Similar Assignment? Let us take care of your classwork while you enjoy your free time! All papers are written from scratch and are 100% Original. Try us today!