Do the following, integrate the results in a Word document. The document should be well formatted mixing the graphs and explanations as requested in the assignment, with ABSOLUTELY NO handwritten or hand drawn items.
Matlab Issues
You can use the diag command to create a diagonal matrix from a vector. Another useful function is reshape, which you can use to create a 36x1 vector from the 9x4 matrix for each number.
To display numbers use the pcolor function (look at the help document to figure out how to use pcolor).
The bsc function comes in handy to add noise to binary data. If you use bipolar data, you'll have to convert to binary first to use bsc, and then convert back.
When evaluating the output of the 10 perceptrons you can use the max function to find out which of the 10 has the largest output. Use the vector output, not the scalar output, of max. The scalar output only provides the value of the maximum, not which element of the input vector holds that value. You can declare the perceptron with the largest output the winner and say that your network recognized the input as the number this perceptron was trained to recognize.
Matlab Assignment
1) Do problem 2.8 from the textbook. Use the weight update equation derived in class in solving this problem. You can use the previously implemented adaline function as the starting point for a new function that will implement a perceptron. Your function should have the following arguments:
% [W,E] = percep(P,T,Tp)
%
% where:
% P - RxQ matrix of Q input vectors
% T - MxQ matrix of target values
% Tp - training parameters
% Tp(1) - learning rate parameter (Default 0.001)
% Tp(2) - time constant for learning rate perimeter (see (2.36))
% - if set to zero the learning rate is constant (Default 0)
% Tp(3) - maximum number of iterations (Default 1000)
% Tp(4) - mean square error goal (Default 0)
% Tp(5) - slope of the activation function sigmoid (Default 1)
% W - weights
% E - error trajectory
Use bipolar inputs to represent the digits. Show that the trained network successfully recognizes the ten digits.
To test the performance of the trained network in noisy conditions pick one digit and change one of the 36 numbers representing that digit to the opposite bipolar value. Then test how the network will classify the corrupted input vector. Experiment with various digits and various numbers of corruptions. Show one case when a corruption causes a misrepresentation and one case when it does not. To experiment with different activation functions change the value of the slope of the activation function sigmoid. Show that a network trained with a new value for this slope successfully recognizes the ten digits.
Proof Assignment
2) Do problem 2.15 from the textbook. Use the solution of problem 2.14, done in class, as a starting point.