Starting from:

$30

EEL5840 - Homework 6 Solved



Your programs must be written in Python. All code must be able to compile and run for
full credit. Comment all code following proper coding conventions. Remember, if we can't
read it, we can't grade it! (For more information on python coding standards, refer to:
https://www.python.org/dev/peps/pep-0008/ )

Question 1 - 10 points
Train a multi-layer perceptron using backpropagation for the following two dimensional
dataset. We have provided some code to implement the MLP, but anything missing you
will need to code up yourself (independently - without using online code sources) and add
it to the code. There are two python  les, one with the MLP implementation (labeled
mlp.py) and another for instantiating the MLP and using it (run.py). If all the proper
code is added in the correct manner, only run.py needs to be run. MLP.py should NOT
be executed directly. It is a module you import into your run.py  le.
Figure 1: 2-D dataset
For the report, use confusion matrices to demonstrate the accuracy of your MLP, and
discuss the methods you used to achieve the highest accuracy. How many nodes do you
have on your hidden layer? How did changing the learning rate change your results? What
role does increased different number of iterations have on accuracy?

More products