SlideShare a Scribd company logo
1 of 29
Artificial Neural Netwoks
Dr. Yosser ATASSI
Lecture 2
Perceptron
Perceptron
Perceptron
x
xo
x
x: class I (y = 1)
o: class II (y = -1)
x
oo
o
x: class I (y = 1)
o: class II (y = -1)
• Examples of linearly inseparable classes
- Logical XOR (exclusive OR) function
patterns (bipolar) decision boundary
x1 x2 y
-1 -1 -1
-1 1 1
1 -1 1
1 1 -1
No line can separate these two classes, as can be
seen from the fact that the following linear inequality
system has no solution
because we have b < 0 from
(1) + (4), and b >= 0 from
(2) + (3), which is a
contradiction
o
xo
x
x: class I (y = 1)
o: class II (y = -1)





<++
≥−+
≥+−
<−−
(4)
(3)
(2)
(1)
0
0
0
0
21
21
21
21
wwb
wwb
wwb
wwb
– XOR can be solved by a more complex network with
hidden units
Y
z2
z1x1
x2
2
2
2
2
-2
-2
θ = 1
θ = 0
(-1, -1) (-1, -1) -1
(-1, 1) (-1, 1) 1
(1, -1) (1, -1) 1
(1, 1) (1, 1) -1
Perceptron Learning
• Perceptron learning algorithm
Step 0. Initialization: wk = 0, k = 1 to n
Step 1. While stop condition is false do steps 2-5
Step 2. For each of the training sample ij: class(ij)
do steps 3 -5
Step 3. compute net= w* ij
Step 4. compute o=f(net)
Step 5. If o != class(ij)
wk := wk + µ ∗ ij * class(ij), k = 1 to n
Notes:
- Learning occurs only when a sample has o != class(ij)
- Two loops, a completion of the inner loop (each
sample is used once) is called an epoch
Stop condition
- When no weight is changed in the current epoch, or
- When pre-determined number of epochs is reached
Exercise
1)(
1
5.0
1
1
1)(
1
5.0
5.1
0
1)(
1
0
2
1
5.0
0
1
1
221100
0
=












−
−
−=












−
−
−=












−
−
0.2=












−
=
=== iclassiiclassiiclassi
W µ
[ ]
[ ]
12
1
1
111
1
00010
0
000
1
6.1
1
5.0
5.1
0
7.006.08.0
*
7.0
0
6.0
8.0
1
0
2
1
*1*2.0
5.0
0
1
1
*)(1
5.25.0021
1
0
2
1
5.0011
*
WW
o
net
iWnet
W
iiclassWWo
net
iWnet
T
T
=
−=
−=












−
−=
=












−
=












−
−
−+












−
=
∗+=+=
=−++=












−
−
−=
=
µ
[ ]
[ ] 5.29.0
1
0
2
1
5.01.04.06.0
5.0
1.0
4.0
6.0
1
5.0
1
1
*2.0
7.0
0
6.0
8.0
1)(1
1.2
1
5.0
1
1
7.006.08.0
*
3
3
22
2
222
<=












−
−
−=












−
=












−
−
+












−
=
=≠−=
−=












−
−
−=
=
net
onVerificati
W
iclasso
net
iWnet T
Notes
Informal justification: Consider o = 1 and class(ij) = -1
– To move o toward class(ij), w1should reduce net
– If ij = 1, ij * class(ij) < 0, need to reduce w (ij *w is
reduced )
– If ij = -1, ij * class(ij) >0 need to increase w (ij *w is
reduced )
ADALINE
ADALINE
Adaline Learning Algorithm
Adaline Learning
Exercise
1)(
1
5.0
1
1
1)(
1
5.0
5.1
0
1)(
1
0
2
1
5.0
0
1
1
221100
0
=












−
−
−=












−
−
−=












−
−
0.2=












−
=
=== iclassiiclassiiclassi
W µ
[ ]
[ ]












−
−
=












−
−
−+












−
=
=
=












−
−=
=












−
=












−
−
−+












−
=
−∗+==
=−++=












−
−
−=
=
2.0
0
4.0
1.0
1
0
2
1
*2*2.0
2.0
0
4.0
3.0
1
1
1
5.0
5.1
0
2.004.03.0
*
2.0
0
4.0
3.0
1
0
2
1
*5.3*2.0
5.0
0
1
1
*)(1
5.25.0021
1
0
2
1
5.0011
*
2
1
1
111
1
00010
0
000
W
o
net
iWnet
W
inetdWWo
net
iWnet
T
T
µ
[ ]
[ ] 6.0
1
0
2
1
1.015.01.04.0
1.0
15.0
1.0
4.0
1
5.0
1
1
*5.1*2.0
2.0
0
4.0
1.0
1)(1
5.0
1
5.0
1
1
2.004.01.0
*
3
3
22
2
222
−=












−
−
−−−=












−
−
−
=












−
−
+












−
−
=
=≠−=
−=












−
−
−−=
=
net
onVerificati
W
iclasso
net
iWnet T
Multi-layer networks
(Relative concentration of NO and NO2 in exhaust fumes as a function
of the richness of the ethanol/air mixture burned in a car engine.)
feedforward network
Error Backpropagation
We want to train a multi-layer feedforward
network by gradient descent to
approximate an unknown function, based
on some training data consisting of pairs
(x,t). The vector x represents a pattern of
input to the network, and the vector t the
corresponding target (desired output).
Weight from unit j to unit i by wij.
Algorithm
Artificial neural netwoks2
Artificial neural netwoks2
Artificial neural netwoks2
Artificial neural netwoks2
Artificial neural netwoks2

More Related Content

What's hot

Eight Regression Algorithms
Eight Regression AlgorithmsEight Regression Algorithms
Eight Regression Algorithmsguestfee8698
 
11130146 chapter 2_-_matrix
11130146 chapter 2_-_matrix11130146 chapter 2_-_matrix
11130146 chapter 2_-_matrixMila Catalina
 
Implicit two step adam moulton hybrid block method with two off step points f...
Implicit two step adam moulton hybrid block method with two off step points f...Implicit two step adam moulton hybrid block method with two off step points f...
Implicit two step adam moulton hybrid block method with two off step points f...Alexander Decker
 
Chpt8 how to do an experiment
Chpt8 how to do an experimentChpt8 how to do an experiment
Chpt8 how to do an experimentLexume1
 
Normal density and discreminant analysis
Normal density and discreminant analysisNormal density and discreminant analysis
Normal density and discreminant analysisVARUN KUMAR
 
Perfect method for Frames
Perfect method for FramesPerfect method for Frames
Perfect method for Framesandreslahe
 
The International Journal of Engineering and Science (The IJES)
The International Journal of Engineering and Science (The IJES)The International Journal of Engineering and Science (The IJES)
The International Journal of Engineering and Science (The IJES)theijes
 
A coefficient inequality for the starlike univalent functions in the unit dis...
A coefficient inequality for the starlike univalent functions in the unit dis...A coefficient inequality for the starlike univalent functions in the unit dis...
A coefficient inequality for the starlike univalent functions in the unit dis...Alexander Decker
 

What's hot (12)

Eight Regression Algorithms
Eight Regression AlgorithmsEight Regression Algorithms
Eight Regression Algorithms
 
11130146 chapter 2_-_matrix
11130146 chapter 2_-_matrix11130146 chapter 2_-_matrix
11130146 chapter 2_-_matrix
 
Implicit two step adam moulton hybrid block method with two off step points f...
Implicit two step adam moulton hybrid block method with two off step points f...Implicit two step adam moulton hybrid block method with two off step points f...
Implicit two step adam moulton hybrid block method with two off step points f...
 
Chpt8 how to do an experiment
Chpt8 how to do an experimentChpt8 how to do an experiment
Chpt8 how to do an experiment
 
Normal density and discreminant analysis
Normal density and discreminant analysisNormal density and discreminant analysis
Normal density and discreminant analysis
 
Shape1 d
Shape1 dShape1 d
Shape1 d
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
 
Perfect method for Frames
Perfect method for FramesPerfect method for Frames
Perfect method for Frames
 
Tut 1
Tut 1Tut 1
Tut 1
 
The International Journal of Engineering and Science (The IJES)
The International Journal of Engineering and Science (The IJES)The International Journal of Engineering and Science (The IJES)
The International Journal of Engineering and Science (The IJES)
 
A coefficient inequality for the starlike univalent functions in the unit dis...
A coefficient inequality for the starlike univalent functions in the unit dis...A coefficient inequality for the starlike univalent functions in the unit dis...
A coefficient inequality for the starlike univalent functions in the unit dis...
 
Krishna
KrishnaKrishna
Krishna
 

Viewers also liked

Artifical neural networks in 5 minutes
Artifical neural networks in 5 minutesArtifical neural networks in 5 minutes
Artifical neural networks in 5 minutesSarah Usher
 
Dr. kiani artificial neural network lecture 1
Dr. kiani artificial neural network lecture 1Dr. kiani artificial neural network lecture 1
Dr. kiani artificial neural network lecture 1Parinaz Faraji
 
Neural network
Neural networkNeural network
Neural networkSilicon
 
neural network
neural networkneural network
neural networkSTUDENT
 
Neural network & its applications
Neural network & its applications Neural network & its applications
Neural network & its applications Ahmed_hashmi
 
Artificial neural network
Artificial neural networkArtificial neural network
Artificial neural networkDEEPASHRI HK
 

Viewers also liked (6)

Artifical neural networks in 5 minutes
Artifical neural networks in 5 minutesArtifical neural networks in 5 minutes
Artifical neural networks in 5 minutes
 
Dr. kiani artificial neural network lecture 1
Dr. kiani artificial neural network lecture 1Dr. kiani artificial neural network lecture 1
Dr. kiani artificial neural network lecture 1
 
Neural network
Neural networkNeural network
Neural network
 
neural network
neural networkneural network
neural network
 
Neural network & its applications
Neural network & its applications Neural network & its applications
Neural network & its applications
 
Artificial neural network
Artificial neural networkArtificial neural network
Artificial neural network
 

Similar to Artificial neural netwoks2

Lecture 2: Artificial Neural Network
Lecture 2: Artificial Neural NetworkLecture 2: Artificial Neural Network
Lecture 2: Artificial Neural NetworkMohamed Loey
 
latest TYPES OF NEURAL NETWORKS (2).pptx
latest TYPES OF NEURAL NETWORKS (2).pptxlatest TYPES OF NEURAL NETWORKS (2).pptx
latest TYPES OF NEURAL NETWORKS (2).pptxMdMahfoozAlam5
 
Neural_N_Problems - SLP.pdf
Neural_N_Problems - SLP.pdfNeural_N_Problems - SLP.pdf
Neural_N_Problems - SLP.pdf8dunderground
 
Top school in India
Top school in IndiaTop school in India
Top school in IndiaEdhole.com
 
Top School in delhi
Top School in delhiTop School in delhi
Top School in delhiEdhole.com
 
Beam deflections using singularity functions
Beam deflections using singularity functionsBeam deflections using singularity functions
Beam deflections using singularity functionsaabhash
 
Two algorithms to accelerate training of back-propagation neural networks
Two algorithms to accelerate training of back-propagation neural networksTwo algorithms to accelerate training of back-propagation neural networks
Two algorithms to accelerate training of back-propagation neural networksESCOM
 
Artificial Neural Networks Lect2: Neurobiology & Architectures of ANNS
Artificial Neural Networks Lect2: Neurobiology & Architectures of ANNSArtificial Neural Networks Lect2: Neurobiology & Architectures of ANNS
Artificial Neural Networks Lect2: Neurobiology & Architectures of ANNSMohammed Bennamoun
 
Redes neuronales basadas en competición
Redes neuronales basadas en competiciónRedes neuronales basadas en competición
Redes neuronales basadas en competiciónSpacetoshare
 
Classification using perceptron.pptx
Classification using perceptron.pptxClassification using perceptron.pptx
Classification using perceptron.pptxsomeyamohsen3
 
6.2 special cases system of linear equations t
6.2 special cases system of linear equations t6.2 special cases system of linear equations t
6.2 special cases system of linear equations tmath260
 
Ib maths sl chain rule
Ib maths sl chain ruleIb maths sl chain rule
Ib maths sl chain ruleestelav
 
Chapter 6 taylor and maclaurin series
Chapter 6 taylor and maclaurin seriesChapter 6 taylor and maclaurin series
Chapter 6 taylor and maclaurin seriesIrfaan Bahadoor
 

Similar to Artificial neural netwoks2 (20)

NN-Ch2.PDF
NN-Ch2.PDFNN-Ch2.PDF
NN-Ch2.PDF
 
Lecture 2: Artificial Neural Network
Lecture 2: Artificial Neural NetworkLecture 2: Artificial Neural Network
Lecture 2: Artificial Neural Network
 
latest TYPES OF NEURAL NETWORKS (2).pptx
latest TYPES OF NEURAL NETWORKS (2).pptxlatest TYPES OF NEURAL NETWORKS (2).pptx
latest TYPES OF NEURAL NETWORKS (2).pptx
 
Neural_N_Problems - SLP.pdf
Neural_N_Problems - SLP.pdfNeural_N_Problems - SLP.pdf
Neural_N_Problems - SLP.pdf
 
03 Single layer Perception Classifier
03 Single layer Perception Classifier03 Single layer Perception Classifier
03 Single layer Perception Classifier
 
Ch[1].2
Ch[1].2Ch[1].2
Ch[1].2
 
Top school in India
Top school in IndiaTop school in India
Top school in India
 
Top School in delhi
Top School in delhiTop School in delhi
Top School in delhi
 
Beam deflections using singularity functions
Beam deflections using singularity functionsBeam deflections using singularity functions
Beam deflections using singularity functions
 
Artificial neural networks
Artificial neural networks Artificial neural networks
Artificial neural networks
 
ann-ics320Part4.ppt
ann-ics320Part4.pptann-ics320Part4.ppt
ann-ics320Part4.ppt
 
ann-ics320Part4.ppt
ann-ics320Part4.pptann-ics320Part4.ppt
ann-ics320Part4.ppt
 
Two algorithms to accelerate training of back-propagation neural networks
Two algorithms to accelerate training of back-propagation neural networksTwo algorithms to accelerate training of back-propagation neural networks
Two algorithms to accelerate training of back-propagation neural networks
 
Artificial Neural Networks Lect2: Neurobiology & Architectures of ANNS
Artificial Neural Networks Lect2: Neurobiology & Architectures of ANNSArtificial Neural Networks Lect2: Neurobiology & Architectures of ANNS
Artificial Neural Networks Lect2: Neurobiology & Architectures of ANNS
 
Redes neuronales basadas en competición
Redes neuronales basadas en competiciónRedes neuronales basadas en competición
Redes neuronales basadas en competición
 
Classification using perceptron.pptx
Classification using perceptron.pptxClassification using perceptron.pptx
Classification using perceptron.pptx
 
Artificial Neural Networks
Artificial Neural NetworksArtificial Neural Networks
Artificial Neural Networks
 
6.2 special cases system of linear equations t
6.2 special cases system of linear equations t6.2 special cases system of linear equations t
6.2 special cases system of linear equations t
 
Ib maths sl chain rule
Ib maths sl chain ruleIb maths sl chain rule
Ib maths sl chain rule
 
Chapter 6 taylor and maclaurin series
Chapter 6 taylor and maclaurin seriesChapter 6 taylor and maclaurin series
Chapter 6 taylor and maclaurin series
 

More from yosser atassi

More from yosser atassi (11)

neural network
neural networkneural network
neural network
 
Search34
Search34Search34
Search34
 
Logical agent8910
Logical agent8910Logical agent8910
Logical agent8910
 
Local search algorithms6
Local search algorithms6Local search algorithms6
Local search algorithms6
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
 
Lecture5
Lecture5Lecture5
Lecture5
 
Inference in first order logic12
Inference in first order logic12Inference in first order logic12
Inference in first order logic12
 
First order logi11c
First order logi11cFirst order logi11c
First order logi11c
 
Chap05
Chap05Chap05
Chap05
 
Artificial intelligence1
Artificial intelligence1Artificial intelligence1
Artificial intelligence1
 
Agents2
Agents2Agents2
Agents2
 

Artificial neural netwoks2