Psychology 149
Machine Learning & AI
Lab Project 3:
1)
Use Matlab functions to create the neural network shown in the image below:
Then
change the activation functions of the hidden layers from the default tangent to the
sigmoidal logistic (logsig) function. Also change the activation function of the
output layer from the default 'pure linear' to the tangent function (tansig).
Set the learning rule to gradient descent (traingd)
Set the learning rate to 0.2
Step 1
Step 2
Step 3
Step 4
2)
Write a program that can determine which of 3 wineries a sample
of wine has come from. Matlab has created a number of datasets
that can be used for training a variety of networks. One of these
datasets can be used for this project. The data set is called
"wine_dataset" which contains two variables. To load the data set,
type the following:
clear all;
load wine_dataset;
Then type "who" in the command window and hit return to see what the variable names are.
The two variable names are
"wineInputs" and "wineTargets"

The problem to solve is this: There are 178
sample bottles of wine. Each of these wines comes from one of three
wineries (lets say Sonoma in Northern California, Bordeaux in France,
and a local winery in Newport Beach).
We will use the two variable to train the
network: "wineInputs" provides the raw training data and "wineTargets"
provides the "correct answers" used to train the network in supervised
learning. Note that both "wineInputs" and "wineTargets" have the
same number of columns (178) because there are 178 samples of wine.
The "wineInputs" variable
is a 13x178 matrix. This is because there are 178 sample wines (each column
corresponds to one of the 178 sample wines) and there are 13 rows. Each
row corresponds to one aspect or feature of the wine (for example,
color intensity, hue, ash, acidity, alcohol content, ...). So to
train the network, differences in these 13 features across the 178 samples are used to
try to distinguish between the wines from the 3 wineries.
For
this project, just use the Matlab default settings for creating and
training the network. This is actually a relatively easy problem to solve.
Step 1
Step 2
Step 3
Step 4
Step 5