Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 1) Classifying handwritten digits: Using the MNIST dataset, we will build a simple threshold-based classifier that classifies 0 digits from non-0's. a) Create a

image text in transcribed

Problem 1) Classifying handwritten digits: Using the MNIST dataset, we will build a simple threshold-based classifier that classifies 0 digits from non-0's. a) Create a new training, validation and test set as you did in problem 3 of Assignment 1, but this time include only the 0 and 1 digits. Hint: From the test set select only O's and ls. Repeat this for the training set. Then, create a validation set as done in the previous assignment. b) Convert each image to one attribute by calculating the average of all the pixel values in the center 3x3 grid of the image. c) Randomly select 500 of the images from the training data. Plot their attribute values that you calculated in part (b). Use different colors and shapes for Os and ls. The x axis in your figure is the image number (1 to 500) and y axis is the calculated attribute. Label the axes and add legends appropriately. Note that these 500 images are your validation set. d) Based on your observation from the plot (i.e., validation set), guess a threshold on the attribute that you think would differentiate the two classes with the highest accuracy. e) Calculate the training, validation, and testing accuracies based on the selected threshold on the corresponding sets and print them. Problem 1) Classifying handwritten digits: Using the MNIST dataset, we will build a simple threshold-based classifier that classifies 0 digits from non-0's. a) Create a new training, validation and test set as you did in problem 3 of Assignment 1, but this time include only the 0 and 1 digits. Hint: From the test set select only O's and ls. Repeat this for the training set. Then, create a validation set as done in the previous assignment. b) Convert each image to one attribute by calculating the average of all the pixel values in the center 3x3 grid of the image. c) Randomly select 500 of the images from the training data. Plot their attribute values that you calculated in part (b). Use different colors and shapes for Os and ls. The x axis in your figure is the image number (1 to 500) and y axis is the calculated attribute. Label the axes and add legends appropriately. Note that these 500 images are your validation set. d) Based on your observation from the plot (i.e., validation set), guess a threshold on the attribute that you think would differentiate the two classes with the highest accuracy. e) Calculate the training, validation, and testing accuracies based on the selected threshold on the corresponding sets and print them

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_2

Step: 3

blur-text-image_3

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

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions

Question

Please try to give correct answer 2 0 3 . 3 2 4 0 6

Answered: 1 week ago