L09 Using Matlab Neural Networks Toolbox
L09 Using Matlab Neural Networks Toolbox
L09 Using Matlab Neural Networks Toolbox
Toolbox
Ranga Rodrigo
April 5, 2014
Most of the sides are from the Matlab
tutorial.
Introduction
Matlab Neural Network Toolbox provides
tools for designing, implementing,
visualizing, and simulating neural
networks.
It supports feedforward networks, radial
basis networks, dynamic networks, selforganizing maps, and other proven
network paradigms.
We will follow Matlabs examples to learn
to use four graphical tools for training
neural networks to solve problems in
Collect data
Create the network
Configure the network
Initialize the weights and biases
Train the network
Validate the network
Use the network
4
FITTING A FUNCTION
Problem Definition
Suppose, for instance, that you have data
from a housing application. You want to
design a network that can predict the
value of a house (in $1000s), given 13
pieces of geographical and real estate
information. You have a total of 506
example homes for which you have those
13 items of data and their associated
market values
6
nnstart
10
11
With these settings, the input vectors and target vectors will be
randomly divided into three sets as follows:
70% will be used for training.
15% will be used to validate that the network is generalizing and to
stop training before overfitting.
The last 15% will be used as a completely independent test of
network generalization.
12
13
14
15
17
18
19
RECOGNIZING PATTERNS
20
Problem Definition
In addition to function fitting, neural
networks are also good at recognizing
patterns.
For example, suppose you want to
classify a tumor as benign or malignant,
based on uniformity of cell size, clump
thickness, mitosis, etc. You have 699
example cases for which you have 9
items of data and the correct
classification as benign or malignant.
Nnstart and click or nprtool
21
nnstart
22
23
24
Select Breast
Cancer and click
Import. You return
to the Select Data
window.
25
26
27
28
29
30
31
32
ROC Curve
The colored lines in
each axis represent
the ROC curves. The
ROC curve is a plot of
the true positive rate
(sensitivity) versus
the false positive rate
(1 - specificity) as the
threshold is varied. A
perfect test would
show points in the
upper-left corner, with
100% sensitivity and
100% specificity. For
this problem, the
network performs
very well.
33
34