Neural Nets
Neural Nets
Overview
Introduction
What are Neural Networks?
◦ Neural networks are a new method of
programming computers.
During training,
◦ the network is trained to associate outputs with input
patterns.
When the network is used,
◦ it identifies the input pattern and tries to output the
associated output pattern.
The power of neural networks comes to life when a pattern
that has no output associated with it, is given as an input.
◦ In this case, the network gives the output that corresponds
to a taught input pattern that is least different from the
given pattern.
Pattern Recognition (cont.)
Here the top row is 2 errors away from a ‘T’ and 3 errors away
from an H. So the top output is a black.
The middle row is 1 error away from both T and H, so the
output is random.
The bottom row is 1 error away from T and 2 away from H.
Therefore the output is black.
Since the input resembles a ‘T’ more than an ‘H’ the output of
the network is in favor of a ‘T’.
A Complicated Perceptron
A more sophisticated Neuron is know as the McCulloch and Pitts model (MCP)
The difference is that in the MCP model, the inputs are weighted and the effect
that each input has at decision making, is dependent on the weight of the
particular input.
The weight of the input is a number which is multiplied with the input to give
the weighted input.
A Complicated Perceptron
(cont.)
The weighted inputs are then added together and if
they exceed a pre-set threshold value, the
perceptron / neuron fires.
Otherwise it will not fire and the inputs tied to that
perceptron will not have any effect on the decision
making.
In mathematical terms, the neuron fires if and only
if;
X1W1 + X2W2 + X3W3 + ... > T
A Complicated Perceptron
(contd)
The MCP neuron has the ability to adapt to a
particular situation by changing its weights and/or
threshold.
Feed-forward networks
◦ Feed-forward NNs allow signals to travel one way only;
from input to output. There is no feedback (loops) i.e. the
output of any layer does not affect that same layer.
Output Layer
◦ Machine mode: returns a class label (e.g., "Premium
Account"/"Basic Account").
If the NN is a classifier, then it also has a single node unless softmax is
used in which case the output layer has one node per class label in your
model.
◦ Regression Mode returns a value (e.g., price)
If the NN is a regressor, then the output layer has a single node.
Hidden Layer
◦ number of hidden layers equals one
the situations in which performance improves
with a second (or third, etc.) hidden layer are
very few.
◦ the number of neurons in that layer is the
mean of the neurons in the input and
output layers.(may change depending on
application, use trial and error method)
Size of Training Data
Rule of thumb:
◦ the number of training examples should be at least
five to ten times the number of weights of the
network.
Other rule:
It takes time, but the trial and error method does produce
results.
Training: Backprop algorithm
The Backprop algorithm searches for weight values that
minimize the total error of the network over the set of
training examples (training set).
Network activation
Forward Step
Error
propagation
Backward Step
The Learning Process
Every neural network possesses knowledge which is
contained in the values of the connection weights.
37
Who is interested?...
Electrical Engineers – signal
processing, control theory
Computer Engineers – robotics
Computer Scientists – artificial
intelligence, pattern recognition
Mathematicians – modelling tool
when explicit relationships are
unknown
38
Uses
Classification — A neural network can be trained
to classify given pattern or data set into predefined
class. It uses feed forward networks.
Prediction — A neural network can be trained to
produce outputs that are expected from given
input. Eg: — Stock market prediction.
Clustering — The Neural network can be used to
identify a special feature of the data and classify
them into different categories without any prior
knowledge of the data.
Coronary
Disease
Classification
STOP
01 10
Neural 11
Net 11 10 00 00 Input patterns
00 11
Input layer
Output layer
00 01 10 11
Sorted
00 10 11 patterns
.
00 11
40
Clustering
00 11
10
11 10
00 11
00
01
41
ANN Applications
Medical Applications
Information
Searching & retrieval
Chemistry
Education
Business & Management
Applications of ANNs
Signal processing
Pattern recognition, e.g. handwritten characters or
face identification.
Diagnosis or mapping symptoms to a medical case.
Speech recognition
Human Emotion Detection
Educational Loan Forecasting
Recognition of speakers in communications
Texture analysis
Three-dimensional object recognition
Hand-written word recognition
Facial recognition
43