logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Eusebio JayCriminology
(5/5)

969 Answers

Hire Me
expert
Joe AvatiEngineering
(5/5)

506 Answers

Hire Me
expert
Abhishek WadhwaEngineering
(5/5)

723 Answers

Hire Me
expert
Sabir AhmadFinance
(5/5)

925 Answers

Hire Me
Mathematics
(5/5)

In this assignment, you\'ll implement what you learned to classify MNIST digists.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

You also wrote down a gradient descent algorithm for it.

In this assignment, you'll implement what you learned to classify MNIST digists. For all questions, you must submit your code and the requested answers. Your code must be present to receive points.

(a) Display one randomly selected image from your training data for each digit class. Provide the index number for each image.

(b) Select the first 500 examples of 0's and 1's for this example, those will form the training data (zi, yi) R784 x {-1,1}, i = 1,..., 1000. Assign label y; = 1 for 1s and y;-1 for Os. Note: To get from images of size 28 x 28 pixels to vectors in R784, you just need to "vectorize" the image. This means you can concatenate each of the 28 columns of the original image into one long vector of length 784. In Matlab, this is done with the command (:), similarly in Python it's numpy.vectorize(x).

i. Implement and run a Gradient Descent algorithm, with step-size μ = 10-6, to optimize the function (1) associated with this setup. You should run your algorithm for at least T = 200 iterations (but if your computer can handle it, do more, until a reasonable stopping criterion is satis ed), and provide a plot showing the value of F(w) at each iteration. Also, feel free to adjust to be larger / smaller if the plot does not match your expectations.

ii. Comment on the resulting plot. In particular, does the value of F(w) decrease with every iteration? Does your algorithm seem to be converging to a fixed w? Explain whether your answers to these questions are consistent with the theory we discussed in class (and in the notes). Be specific i.e., point to a specific theorem (or theorems) and indicate why it does or does not explain the behavior of the algorithm. Would the theory dictate a different choice of μ?

iii. Now, use the w you found from part (a) to classify the first 500 test data points associated to each of the 0 and 1 handwritten digits. Recall that you need to use the function y = sign(wr) to classify. What was the classification error rate associated with the two digits on the test data (this should be a number between 0 and 1)? What was it on the training data?

(c) Repeat parts (b)i. and (b)iii. for digits of 4s and 9s. Comment on the difference between the results and propose a reason as to why the performance did or did not change.

(5/5)
Attachments:

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme