Question: Digit Detection using Single Layer Perceptron in Matlab ame as ttribute 784x1000 784000 1000 3920000 test uint8 uint8 uint8 uint8 testlabels 1000x1 train 784x5000 trainlabels

Digit Detection using Single Layer Perceptron in Matlab

Digit Detection using Single Layer Perceptron in Matlab ame as ttribute 784x1000

ame as ttribute 784x1000 784000 1000 3920000 test uint8 uint8 uint8 uint8 testlabels 1000x1 train 784x5000 trainlabels 5000x1 5000 The variable 'train' includes images of 5000 hand-written digits. However, to see images of these digits you should change 'train' from a 784 x 5000 to a variable such as 'x' which has the dimension of 28 x 28 x 5000. Then you will have five thousand 28 x 28 images of these digits. A simple way of doing this is: load digits.mat for k1:5000 dummy = train (:, k) ; for i 1:28 for j1:28 x (i,j,k)double (dummy (i-1) 28 j) en imagesc (x (,, k) ') colormap gray) colorbar pbaspect (I1 1 1]) pause (0.2) end The number associated with each digit in 'train' is given in 'trainlabels' In this project, you should design and train a single-layer 2-dimensional Perceptron to recognize these digits A. Design and train a single-layer 2-dimensional Perceptron that can detect the digit '0'. In other words, your Perceptron should return +1 when the digit in the image is '0' and -1 otherwise. Train your Perceptron with the 5000 images available in 'train' and test the performance of your system by using the other variable, 'test, in your data file. When you are training your Perceptron, simultaneously monitor the number of errors in the last 100 iterations. (Try to choose a reasonable value for your training rate and reduce it as a function of iteration number). How is the performance of the system? Also look at the image of your weights w which is a 28 x 28 variable vector. How does it look? Why? B. Repeat this experiment but this time try to detect digit '8'. Does your network perform better or worse? Why? Now try '1' and '2' ame as ttribute 784x1000 784000 1000 3920000 test uint8 uint8 uint8 uint8 testlabels 1000x1 train 784x5000 trainlabels 5000x1 5000 The variable 'train' includes images of 5000 hand-written digits. However, to see images of these digits you should change 'train' from a 784 x 5000 to a variable such as 'x' which has the dimension of 28 x 28 x 5000. Then you will have five thousand 28 x 28 images of these digits. A simple way of doing this is: load digits.mat for k1:5000 dummy = train (:, k) ; for i 1:28 for j1:28 x (i,j,k)double (dummy (i-1) 28 j) en imagesc (x (,, k) ') colormap gray) colorbar pbaspect (I1 1 1]) pause (0.2) end The number associated with each digit in 'train' is given in 'trainlabels' In this project, you should design and train a single-layer 2-dimensional Perceptron to recognize these digits A. Design and train a single-layer 2-dimensional Perceptron that can detect the digit '0'. In other words, your Perceptron should return +1 when the digit in the image is '0' and -1 otherwise. Train your Perceptron with the 5000 images available in 'train' and test the performance of your system by using the other variable, 'test, in your data file. When you are training your Perceptron, simultaneously monitor the number of errors in the last 100 iterations. (Try to choose a reasonable value for your training rate and reduce it as a function of iteration number). How is the performance of the system? Also look at the image of your weights w which is a 28 x 28 variable vector. How does it look? Why? B. Repeat this experiment but this time try to detect digit '8'. Does your network perform better or worse? Why? Now try '1' and '2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!