Homework 1 and 2 (combined) - ANN Fundamentals

Due Wednesday, February 20, 2013

NOTE: This assignment, like others in this class, is due at the beginning of the class period. This means that if you are even a minute late, you lose 20%. If you are worried about potentially being late, turn in your homework ahead of time. Do this by submitting them to me during office hours or by sliding it under my office door. Do not send assignments to me through email or leave them in my departmental mail box.

As discussed in class, the fundamental computing element for an artificial neural network (ANN) is the artificial neuron (AN). ANs can be combined in many ways to compute more complex functions but the most fundamental way is by combining them into a layered, feedforward neural network (FFNN). ANs and FFNNs can learn in many ways but the most fundamental way is supervised learning. Moreover, ANs and FFNNs may be used for many tasks but the two most fundamental are classification and function approximation. These ANN fundamentals — ANs, FFNNs, supervised learning, classification, and function approximation — are the topics of this homework.

The assignment.

Complete the following exercises:

Part 1 — AN Representation

  1. Consider a single AN used for classification in a 2D space with an augmented vector. This AN is a summation unit (SU) and its activation function fAN is a step function with outputs γ1=1 and γ2=0. Given the weights v1=0.3, v2=0.2, and v3=0.1, draw this AN.
  2. Draw (on graph or engineering paper) the decision boundary encoded by this AN. Be sure to indicate the γ1 side of the boundary.
  3. Add the following points on the graph you just drew and label the class of each according to the AN.
  4. Assume that the AN’s classification of each of the points above is correct. List a new labeled data item which, if added to the data set above, would necessarily cause the AN to misclassify at least one data item. Explain why the AN would necessarily misclassify at least one data item.
  5. Explain how the decision boundary for this AN would change if γ2 were changed to −1, rather than 0.
    [Note for explanatory questions, like this one: To explain the answer, describe what the answer is — in this case, what changes (if any) there are to the decision boundary — and also why that is the correct answer — in this case that answer would be based on how the value of γ affects the decision boundary.]
  6. Explain how the decision boundary for this AN would change if fAN were changed to be a sigmoidal function.
  7. Explain how the classification of each of the points listed above would change if fAN were a sigmoidal function.

Part 2 — AN Learning

  1. Consider the same AN given above in 1.1. Explain how its weights would be updated, using the updating rule we covered in class on January 16, given each of the following labeled data points, presented in the following order:
  2. Draw the graph of the data and the decision boundary after each weight update for the data given in 2.1.
  3. Explain which of the points in 2.1 are correctly classified by this AN after all of the weight updates from one learning pass through this data and explain what this tells us about the use of this learning rule.
  4. Explain how many more passes through the data are needed before all of the points from 2.1 are correctly classified by this AN. Show your work.

Part 3 — FFNN Representation

  1. Consider a two-layer FFNN — that is, one with two layers of computational elements (ANs) — used for classification in a 2D space with augmented vectors. The ANs in this FFNN are all SUs and their activation functions are identical to fAN as given in 1.1. There are four ANs in the hidden layer and one in the output layer. Given the weights v1,1=0.6, v2,1=0.2, v3,1=0.1, v4,1=0.0, v1,2=0.3, v2,2=0.6, v3,2=0.7, v4,2=0.8, v1,3=0.1, v2,3=0.2, v3,3=0.1, v4,3=0.1, w1=0.5, w2=1.0, w3=0.0, and w4=0.75, draw this FFNN.
  2. Draw the decision region encoded by this FFNN. Be sure to indicate the γ1 side of the region.
  3. Add the following points on the graph you just drew and label the class of each according to the AN.
  4. Explain how the decision region for this AN would change if γ2 were changed to −1, rather than 0 and explain which points, if any, from those above would be classified differently and which would be classified the same.

Part 4 — FFNN Learning

  1. Consider the FFNN given above in 3.1 but with sigmoidal activation functions for each AN and η = 0.5. Explain how its weights would be updated, using the backpropagation algorithm we covered in class on January 28, given if presented with the data item (0.8, 0.8) γ1. Show your work. Keep track of four significant digits.
  2. Calculate the output value of the FFNN above if, after learning on (0.8, 0.8) γ1, you were to present this data item to the FFNN again. Show your work. Keep track of four significant digits.
  3. Explain whether the error value for the input (0.8, 0.8) γ1 increased or decreased due to learning.

What to turn in.

Turn in a neatly handwritten copy of your answers to the exercises for this assignment. The diagrams should be drawn on engineering or graph paper. You may also turn in a scanned electronic copy of this assignment as a backup in case your paper copy is misplaced.