Reference no: EM132239285
Neural Networks Lab: Unsupervised Learning
Please finish the code and make do the project (you will need to make a competitive learning network and a Hopfield network).
Code for both the CLR and Hopfield Neural nets that categorizes the Greebles.
Project
Recent events led to the creation of the "Department for Greeble Security". You are a programmer for this recently established ministry and your job is to write software that distinguishes the "good" Greebles from the "bad" Greebles. Researchers in another section of the department have shown that three parameters correlate with the tendency that a Greeble is good or bad. These parameters are: "boges" length, "quiff" width and "dunth" height [7]. Specifically, it has been shown that good Greebles have long boges, thin quiffs and high dunths while the bad Greebles tend to have short boges, thick quiffs and low dunths.
A given individual Greeble might have any number of variations of these parameters. In other words, this classification is not as clear-cut and easy as your superiors might want it to be. That's where you come in. You decide to solve this problem with a neural network, since you know that neural networks are well suited for this kind of problem.
In this project, you will be asked to create two neural networks.
1) The first neural network will be a competitive learning network that distinguishes good from bad Greebles.
a) Train the network with the training set on Canvas (it contains data on Greebles who have been shown to be good or evil in the past, along with their parameters for boges length, quaff width and dunth height.) Plot the training data in three dimensions along with the two weight vectors associated with the good and evil output neurons using quiver3.
b) Test the network with the test set on Canvas (it contains parameters on Greebles that were recently captured by the department and suspected of being bad. Use your network to determine if they are (more likely to be) good or bad).
c) Document these steps, but make sure to include a final report on the test set. Which Greebles do you (your network) recognize as being bad, which do you recognize as being good?
d) Qualitatively evaluate the confidence that you have in this classification. Include graphs and figures to this end.
The future and welfare of the Greebles rests in your hands.
Hints:
– Load the two training populations using the command xlsread(‘filename'). Each file contains measurements of three parameters (in inches): Boges length, quaff width and dunth height. Each row represents an individual Greeble.
– Before you do anything else, you might want to plot your populations in a three- dimensional space (you have three parameters per individual). You can do this by using plot3(param1,param2,param3). In other respects, plot3 works just like plot.
– Merge the data into a big training vector
– Create the competitive network
– Train the competitive network
– Download the test files and test the population with your trained network
– Your program should produce a final list which Greebles in the test population are good and which are bad. Also: Graph input weights before and after training.
– Disclaimer: No actual Greebles were hurt when preparing this tutorial.
2) The second neural network that you will create is a Hopfield network that will store the prototypical good and bad Greeble. Specifically, you should do the following
a) Normalize the features of all the Greebles so that the largest feature value across all Greebles for each of the three features is 1 and the lowest feature value is -1.
b) Create the prototypical good and bad Greebles by taking the average features of the good and bad Greebles, respectively.
c) Build a Hopfield network to store the good and bad prototypes (i.e. two feature vectors).
d) Use the test set to see if the Hopfield network can categorize the suspected Greebles as prototypical good or bad Greebles. Compare these results with the results using the competitive learning network.
The equilibrium state of the Hopfield network should be one of these two vectors [1 -1 1] or [-1 1 -1] for the good and bad Greebles, respectively.
Attachment:- Neural Nets.rar