Ann Chapter 2
Ann Chapter 2
E (EIC)
UEI-401
Artificial Intelligent Techniques &
Applications
Lecture 1 Chapter 2: Artificial Neural Networks
Dr . Gagandeep Kaur
Associate Professor,
Department of Electrical & Instrumentation Engineering,
Thapar Institute of Engineering & Technology, Patiala
Chapter 2 : ARTIFICIAL NEURAL NETWORKS
decision
• Y is output
The Processing element processes the inputs
and weights and provides output accordingly
Another representation of Artificial
Neural Network model
OUTPUT of ANN
x and x are inputs
1 2
Y = x w +x w +....+x w = ∑ x w
in 1 1 2 2 n n i i
Y is output
Brain Vs Computer
• Comparison between biological neuron and
artificial neuron
1. Speed
2. Processing
3. Size and complexity
4. Storage capacity
5. Tolerance
6. Control mechanism
Advantages of Neural Networks(NN)
• Neural network is having ability to derive
meaning from complicated or imprecise data
• Neural networks can extract patterns and
detect trends from imprecise data which other
computer techniques may not
• Neural networks can answer few uncertainties
of the kind “what if”
Advantages of Artificial neural
network(ANN)
• Adaptive learning : ANN have ability to learn
how to do task from given data
• Self organization : ANN can create its own
organisation or representation of information
it receives during learning time
• Real time operation : ANN can do real time
operations
• Fault tolerance : ANN havegreat fault
tolerance
Applications of ANN
• Air traffic control
• Appraisal and valuation of property , building , automobiles , machinery
• weather forecast
• Traffic flaws
• Voice recognition
• Image analysis
• Handwriting and typewriting analysis
• river water level
• Fraud detection
• Data mining ,cleaning and validation
• Complex physical and chemical process
• Echo patterns from SONAR and RADAR
• Econometric modelling for statistical analysis
• Betting in share market , horse race , sporting events
• Music composition
• Scheduling of air planes , buses and trains
• Strategies for gamming business and war
• Medical diagnosis and medical research etc
Evolution of neural networks
• It all started in 1943 with McCullock and Pitts neuron by
McCullock and Pitts
• Then in 1949 Hebb’s network
• 1958 it is Perceptron
• 1960 it is Adaline
• 1972 it is Kohonen self organising maps
• 1982 is Hop field network
• 1986 is Back propagation network
• 1988 is Counter propagation network
• 1987-1990 is Adaptive Resonance theory(ART)
• 1988 is Radial bias function
• 1988 is Neo cognition
References for Lecture
1. Principles of Soft Computing , Second edition ,
S.N. Sivanandam , S.N. Deepa , Wiley , India
2. Artificial Intelligence, E.Rich , K.Knight , TMH
3. Artificial Intelligence, D.Khemani , Mcgraw Hill
4. Introduction to Artificial Intelligence and Expert
System, D.W.Patterson , PHI
5. Fuzzy logic with engineering applications,
T.J.Ross, second edition, Wiley India
6. Google.com
Thanks
Course of B.E (EIC)
UEI-401
Artificial Intelligent Techniques &
Applications
Lecture 2: Chapter :2 Artificial Neural Networks
Dr.Gagandeep Kaur
Associate Professor,
Department of Electrical & Instrumentation Engineering,
Thapar Institute of Engineering & Technology, Patiala
CHAPTER 2 : ARTIFICIAL NEURAL
NETWORKS
Dr . Gagandeep Kaur
Associate Professor,
Department of Electrical & Instrumentation Engineering,
Thapar Institute of Engineering & Technology, Patiala
Chapter 2 : ARTIFICIAL NEURAL NETWORKS
• Correct target output values are known for every input pattern
Unsupervised Learning
• In ANNs following unsupervised learning, the input
vectors of similar type are grouped without the use
of training data to specify how a member of each
group looks or to which group a number belongs.
1. Identity function
2. Binary step function
3. Bipolar step function
4. Sigmoidal functions
5. Ramp function
Types of Activation Functions
1. Identity function: It is a linear function and
can be defined as
f(x) = x for all x
The output here remains the same as input.
The input layer uses the identity activation
function.
Types of Activation Functions
Types of Activation Functions
2. Binary step function: This function can be
defined as
f(x) = { 1 if x ≥ θ
{ 0 if x< θ
where θ represents the threshold value. This
function is most widely used in single-layer
nets to convert the net input to an output that
is a binary (1 or 0).
Types of Activation Functions
Types of Activation Functions
3. Bipolar step function: This function can be
defined as
f(x) = { 1 if x ≥ θ
{ - 1 if x< θ
Dr . Gagandeep Kaur
Associate Professor,
Department of Electrical & Instrumentation Engineering,
Thapar Institute of Engineering & Technology, Patiala
Chapter 2 : ARTIFICIAL NEURAL NETWORKS
• Weights
• Bias
• Threshold
• Learning rate (α)
• Momentum Factor
• Vigilance Parameter
• Notations
Other important parameters associated with ANNs
Weights
• In the architecture of an ANN, each neuron is
connected to other neurons by means of directed
communication links, and each communication link is
associated with weights.
• The weights contain information about the input
signal which is used by the net to solve a problem.
Other important parameters associated with ANNs
Lecture 5
Dr . Gagandeep Kaur
Associate Professor,
Department of Electrical & Instrumentation Engineering,
Thapar Institute of Engineering & Technology, Patiala
1
Chapter 2 : ARTIFICIAL NEURAL NETWORKS
2
McCULLOCH–PITTS (MP)NEURON
3
McCULLOCH–PITTS NEURON
4
McCULLOCH–PITTS NEURON
5
McCULLOCH–PITTS NEURON
ARCHITECTURE
• It is excitatory with weight (w > 0) or inhibitory with
weight -p(p < 0).
6
7
McCULLOCH–PITTS NEURON
ARCHITECTURE
• The weights of the neuron are set along with the threshold to
make the neuron "perform a simple logic function.
9
McCULLOCH–PITTS NEURON
ARCHITECTURE
• It is used as building blocks on which function or
phenomenon, which represented as a logic function
can be modeled.
10
LINEAR SEPARABILITY
Linear separability is the concept wherein the separation of the
input space into regions is based on whether the network response
is positive or negative.
Consider a network having
positive response in the first
quadrant and negative response
in all other quadrants (AND
function) with either binary or
bipolar data, then the decision
line is drawn separating the
positive response region from
the negative response region.
11
HEBB NETWORK
Donald Hebb stated in 1949 that in the brain, the learning is
performed by the change in the synaptic gap. Hebb explained it:
12
HEBB NETWORK
• In Hebb learning, if two interconnected neurons are 'on'
simultaneously then the weights associated with these
neurons can be increased by the modification made in their
synaptic gap (strength). The weight update in Hebb rule is
given by
• The Hebb rule is more suited for bipolar data than binary
data. If binary data is used, the above weight updation
formula cannot distinguish two conditions namely:
13
HEBB NETWORK
1. A training pair in which an input unit is "on" and target value
is "off."
2. A training pair in which both the input unit and the target
value are "off.“
14
HEBB NETWORK
Flow Chart of Training Algorithm
• The training algorithm is used for the calculation and
adjustment of weights.
15
16
HEBB NETWORK
Training Algorithm
Step 0: First initialize the weights. Basically in this network they
may be set to zero, i.e., wi = 0 for i= 1 to n where "n" may
be the total number of input neurons.
Step 1: Steps 2-4 have to be performed for each input training
vector and target output pair, s: i.
18
Problems
1. For the network shown, we will find the net input to the output
neuron.
19
• The net input can be calculated as
20
Problems
2. Obtain the output of the neuron Y for the network shown in
figure using activation functions as: (i) binary sigmoidal and
(ii) bipolar sigmoidal.
• Solution: The given network has three input neurons with bias
and one output neuron. These form a single-layer network.
21
Problems
The inputs are given as [x1 , x2, x3] = [0.8,0.6,0.4] and the weights
are [w1 , w2 , w3 ] = [0.1, 0.3, -0.2] with bias b = 0.35
(its input is always 1).
The net input to the output neuron is
22
Problems
(i) For binary sigmoidal activation function.
23
24
References for Lecture
1. Principles of Soft Computing , S.N. Sivanandan, SN
Deepa ; Wiley India (Chapter 2: ANN of course of
UEI-401)
2. Fuzzy logic with Engineering Applications, T.J Ross ,
Second edition ,Wiley India (Chapter 3: Fuzzy Logic of
course of UEI-401)
3. Artificial Intelligence, E . Rich , K . Knight ,
TMH(Chapter 1: Overview of Artificial Intelligence)
4. Artificial Intelligence, D. Khemani , Mcgraw Hill
5. Introduction to Artificial Intelligence and Expert
System, D.W. Patterson , PHI
6. Google.com
Course of B.E (EIC)
UEI-401
Artificial Intelligent Techniques &
Applications
Chapter 2: Artificial Neural Networks
Lecture 6
Dr . Gagandeep Kaur
Associate Professor,
Department of Electrical & Instrumentation Engineering,
Thapar Institute of Engineering & Technology, Patiala
1
Chapter 2 : ARTIFICIAL NEURAL NETWORKS
2
Supervised Learning Network
3
Supervised Learning Network
Perceptron Networks
4
Supervised Learning Network
Perceptron Networks
3. The binary activation function is used in sensory unit
and associator unit.
4.. The response unit has an activation of 1, 0 or -1. The
binary step with fixed threshold θ is used as
activation for associator. The output signals that are
sent from the associator unit to the response unit are
only binary.
5
Supervised Learning Network
Perceptron Networks
1 if yin> θ
f(yin) = 0 if - θ ≤ yin ≤ θ
1 if yin< - θ
6
Supervised Learning Network
Perceptron Networks
6. The perceptron learning rule is used in the weight
updation between the associator unit and the
response unit. For each training input, the net will
calculate the response and it will determine whether
or not an error has occurred.
7. The error calculation is based on the comparison of
the targets with those of the calculated outputs.
7
Supervised Learning Network
Perceptron Networks
9. The weights will be adjusted on the basis of the
learning rule if an error has occurred for a particular
training pattern i.e,
9
10
Supervised Learning Network
Original Perceptron Networks
1 Sensory Unit
2. Associator Unit
3. Response Unit
11
Supervised Learning Network
Perceptron Learning Rule
• Learning signal is the difference between the desired and
actual response of neuron.
The perceptron learning rule is explained as follows :
• Consider a finite "n" number of input training vectors, with
their associated target(desired) values x(n) and t{n), where
"n" ranges from 1 to N.
12
Supervised Learning Network
Perceptron Networks
The weight updation in case of perceptron learning is as shown.
• lf y ≠ t, then
w(new) = w (old) + α tx {α - learning rate)
else, we have
w (new) = w (old)
• If there is a weight vector W, such that
f(x(n) W) = t(n) for all n
• Then for any starting vector w1, the perceptron learning rule
will converge to a weight vector that gives the correct
response for all training patterns and this learning takes place
within a finite number of steps provided that solution exists.
13
Supervised Learning Network
Perceptron Networks
14
Supervised Learning Network
Perceptron Networks
• The flowchart depicted here
presents the flow of the training
process
• First the basic initialization
required for the training process
is performed.
• The entire loop of the training
process continues until the
training input pair is presented
to the network.
• The training {weight updation) is
done on the basis of the
comparison between the
calculated and desired output.
• The loop is terminated if there is
no change in weight. 15
Supervised Learning Network
Perceptron Training Algorithm
16
Supervised Learning Network
Perceptron Training Algorithm
17
Supervised Learning Network
Perceptron Training Algorithm
18
19
20
21
22
23
24
25
26
• Adaline , Madaline and Back propagation
network are the supervised learning based
neural network algorithms
• The problems we will be solving in the tutorial
classes
27
References for Lecture
1. Principles of Soft Computing , S.N. Sivanandan, SN Deepa
; Wiley India (Chapter 2 ANN and 3: Fuzzy Logic of
course of UEI-401)
2. Fuzzy logic with engineering applications, T.J Ross ,
Second edition ,Wiley India (Chapter 3: Fuzzy Logic of
course of UEI-401)
3. Artificial Intelligence, E . Rich , K . Knight ,
TMH(Chapter1:Overview of AI of the course of UEI-401)
4. Artificial Intelligence, D. Khemani , Mcgraw Hill
5. Introduction to Artificial Intelligence and Expert System,
D.W. Patterson , PHI
6. Google.com
Course of B.E (EIC)
UEI-401
Artificial Intelligent Techniques &
Applications
Chapter 2: Artificial Neural Networks
Lecture 7
Dr . Gagandeep Kaur
Associate Professor,
Department of Electrical & Instrumentation Engineering,
Thapar Institute of Engineering & Technology, Patiala
1
Chapter 2 : ARTIFICIAL NEURAL NETWORKS
2
Back-Propagation Network
3
Back-Propagation Network
4
Back-Propagation Network
5
Back-Propagation Network
Flowchart for training Process
• The flowchart for the training process using a BPN is shown
The terminologies used in the flowchart and in the training
algorithm are as follows:
• x = input training vecro.r (x1, ... , xi;, ... , xn)
• t = target output vector (t1, ... , tk, ... , tm)
• α = learning rate parameter
• xi = input unit i. (Since the input layer uses identity activation
function, the input and output signals here are same.)
• ν0j = bias on jth hidden unit
• ωok = bias on kth output unit
• Z j=hidden unit j. The net input to Zj is
6
Back-Propagation Network
Flowchart for training Process
7
Back-Propagation Network
Flowchart for training Process
and the output is
8
Back-Propagation Network
Flowchart for training Process
9
Back-Propagation Network
10
Back-Propagation Network
11
Back-Propagation Network
and apply the activation function to compute output signal
13
Back-Propagation Network
Weight and bias updation (Phase Ill)
Step 8: Each output unit (yk, k = 1 to m) updates the
bias and weights:
Each hidden unit (zj = 1 top) updates its bias and weights:
14
15
16
17
18
19
20
21
22
23
24
25
References
1. Principles of Soft Computing , S.N. Sivanandan, SN Deepa
; Wiley India (Chapter 2 ANN and 3: Fuzzy Logic of
course of UEI-401)
2. Fuzzy logic with engineering applications, T.J Ross ,
Second edition ,Wiley India (Chapter 3: Fuzzy Logic of
course of UEI-401)
3. Artificial Intelligence, E . Rich , K . Knight ,
TMH(Chapter1:Overview of AI of the course of UEI-401)
4. Artificial Intelligence, D. Khemani , Mcgraw Hill
5. Introduction to Artificial Intelligence and Expert System,
D.W. Patterson , PHI
6. Google.com
Course of B.E (EIC)
UEI-401
Artificial Intelligent Techniques &
Applications
Chapter 2: Artificial Neural Networks
Lecture 8
Dr . Gagandeep Kaur
Associate Professor,
Department of Electrical & Instrumentation Engineering,
Thapar Institute of Engineering & Technology, Patiala
1
Chapter 2 : ARTIFICIAL NEURAL NETWORKS
2
ADALINE
Course of B.E (EIC)
UEI-401
Artificial Intelligent Techniques &
Applications
Chapter 2: Artificial Neural Networks
Lecture 8
Dr . Gagandeep Kaur
Associate Professor,
Department of Electrical & Instrumentation Engineering,
Thapar Institute of Engineering & Technology, Patiala
1
Chapter 2 : ARTIFICIAL NEURAL NETWORKS
2
ADALINE
References
1. Principles of Soft Computing , S.N. Sivanandan, SN Deepa
; Wiley India (Chapter 2 ANN and 3: Fuzzy Logic of
course of UEI-401)
2. Fuzzy logic with engineering applications, T.J Ross ,
Second edition ,Wiley India (Chapter 3: Fuzzy Logic of
course of UEI-401)
3. Artificial Intelligence, E . Rich , K . Knight ,
TMH(Chapter1:Overview of AI of the course of UEI-401)
4. Artificial Intelligence, D. Khemani , Mcgraw Hill
5. Introduction to Artificial Intelligence and Expert System,
D.W. Patterson , PHI
6. Google.com
Thanks