Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Can someone please help me understand this i have no idea where to start 1. [20pts] Write an implementation of the perceptron learning algorithm that

Can someone please help me understand this i have no idea where to start

1. [20pts] Write an implementation of the perceptron learning algorithm that first loads images for the digit 0 and then for the digit 1. Start with random weights from a normal distribution. Compute the average accuracy on blocks of 25 items and plot this accuracy until you think it wont get better.

2. [5pts] Does your solution in Q1 converge on 100% accuracy or not? What does this mean in terms of the linear separability of 0 and 1 on this feature space?

3. [15pts] Reshape (numpy.reshape) your weight vector after training so that it is a 28x28 matrix. This corresponds to the weight assigned to each pixel in the image. Show a picture of this weight matrix and interpret it in a sentence or two. What do large negative and large positive values mean, intuitively? What do numbers near zero mean? Why does this matrix look the way that it does, in terms of where large positive and negative terms are located?

4. [10pts] What should you expect to happen if you set the elements of the weight vector which are close to zero to be actually zero? Do this for the 10, 20, 30, ... 780 weight values closest to zero (in absolute value) and plot the resulting accuracies on 1000 random classifications of 0 vs 1. What does this tell you about the proportion of the image which is diagnostic about 0 vs 1?

5. [20pts] Next show a matrix of the classification accuracy of each pair of digits after enough training. Make this a plot (with colors for accuracy rather than numbers). Does it match your intuitions about which pairs should be easy vs. hard? Why or why not?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions