Back Propagation Neural Network
For the multi-layer neural network that you will be implementing in the following problems, you may
use either the hyperbolic tangent or the sigmoid for the activation function. Obviously you will be
implementing the back propagation method to train the network. Your code should include an
arbitrary method that allows you to code it for any number of input dimensions, hidden layers,
neurons and output neurons, (i.e. you need it to be able to allow you to change a variable and it
changes the number of layers, or the number of neurons at a given layer, or the number of
dimensions, or the number of output layers…in other words this cannot be hard coded for a specific
1. Develop a multi-layer neural network to solve the regression problem: f(x) = 1/x. Be sure to
create a testing and training set. In the interest of time, it is not necessary to use K-Fold cross-
validation, although the student may do so at his/her discretion. The number of hidden layers and
neurons should be determined using the generalization error technique. Plot this error for the
different models to show why you chose the final model that you did for this problem. Report your
network configuration, and comment on your observations regarding the performance of your
network as you try to determine the number of hidden layers and hidden nodes of your final network,
once you determine the correct model:
a. Track your training and testing history. That is, check your training performance and your
testing performance at multiples of some fixed number of iterations (and over many Epochs
also), implement the online learning method, thus an iteration is training with one sample. Be
sure to label plots appropriately. (Remember to scale the data in the range that provides the
best results for your activation function … normalization is a must)
b. What did you observe regarding the value of the learning parameter and how the network
performed given: (do one of each)
i. a fixed value,
ii. and a time decreasing value
c. Choose a couple of points beyond your training set (i.e., if your max training input is x=10,
try testing your network with, say, x=10.5, x=10.75, and x=11). What do you observe
regarding the networks ability to generalize for data that is beyond its training set (note, you
may have to increase the value of x to get a good idea)?
d. Briefly comment on the extrapolation capability (part d) compared to the interpolation
capability (part a) of the network.
e. Plot the final results showing the capability of your network to determine the function f(x) =
1/x versus the function f(x) = 1/x.
2. Develop a multi-layer neural network to classify the IRIS data set. Use K-Fold Cross
Validation for this problem.
a. Report your network configuration: number of hidden layers, number of nodes per hidden
layer, learning rate/learning schedule, encoding of the output, etc.
b. Plot the error metric versus the number of training steps (similar to problem 1).
c. Comment on how well your network learned the data. Things to think about: did the network
classify the data well (or not), and why (or why not); how well did it classify each class
independently (you might consider contingency tables for this); and what observation do you
have regarding number of training samples?
deadline - 7th march
5 freelanceria on tarjonnut keskimäärin $62 tähän työhön
Hi, I can help you with this homework, I will implement part 1 and part 2 before the 7th of march and deliver a clean and comprehensive notebook in colab.