-Artificial Neural Network- Perceptron (感知器)

Slides:



Advertisements
Similar presentations
Multi-Layer Perceptron (MLP)
Advertisements

Perceptron Lecture 4.
Slides from: Doug Gray, David Poole
1 Machine Learning: Lecture 4 Artificial Neural Networks (Based on Chapter 4 of Mitchell T.., Machine Learning, 1997)
Introduction to Neural Networks Computing
Artificial Neural Networks (1)
Perceptron Learning Rule
1 Neural networks. Neural networks are made up of many artificial neurons. Each input into the neuron has its own weight associated with it illustrated.
-Artificial Neural Network- Chapter 2 Basic Model
-Artificial Neural Network- Counter Propagation Network
Machine Learning: Connectionist McCulloch-Pitts Neuron Perceptrons Multilayer Networks Support Vector Machines Feedback Networks Hopfield Networks.
Simple Neural Nets For Pattern Classification
The Perceptron CS/CMPE 333 – Neural Networks. CS/CMPE Neural Networks (Sp 2002/2003) - Asim LUMS2 The Perceptron – Basics Simplest and one.
-Artificial Neural Network- Chapter 3 Perceptron 朝陽科技大學 資訊管理系 李麗華 教授.
-Artificial Neural Network- Adaptive Resonance Theory(ART) 朝陽科技大學 資訊管理系 李麗華 教授.
-Artificial Neural Network- Chapter 4 朝陽科技大學 資訊管理系 李麗華 教授.
Data Mining with Neural Networks (HK: Chapter 7.5)
-Artificial Neural Network- Chapter 5 Back Propagation Network
Neural Networks. Background - Neural Networks can be : Biological - Biological models Artificial - Artificial models - Desire to produce artificial systems.
-Artificial Neural Network- Chapter 3 Perceptron 朝陽科技大學 資訊管理系 李麗華教授.
Where We’re At Three learning rules  Hebbian learning regression  LMS (delta rule) regression  Perceptron classification.
Artificial Neural Networks
-Artificial Neural Network- Chapter 9 Self Organization Map(SOM) 朝陽科技大學 資訊管理系 李麗華 教授.
Neural Networks AI – Week 23 Sub-symbolic AI Multi-Layer Neural Networks Lee McCluskey, room 3/10
-Artificial Neural Network- Hopfield Neural Network(HNN) 朝陽科技大學 資訊管理系 李麗華 教授.
1 Pattern Recognition: Statistical and Neural Lonnie C. Ludeman Lecture 20 Oct 26, 2005 Nanjing University of Science & Technology.
Artificial Intelligence Techniques Multilayer Perceptrons.
CS 478 – Tools for Machine Learning and Data Mining Backpropagation.
CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 31: Feedforward N/W; sigmoid.
CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 30: Perceptron training convergence;
Back-Propagation Algorithm AN INTRODUCTION TO LEARNING INTERNAL REPRESENTATIONS BY ERROR PROPAGATION Presented by: Kunal Parmar UHID:
CS621 : Artificial Intelligence
Introduction to Neural Networks Introduction to Neural Networks Applied to OCR and Speech Recognition An actual neuron A crude model of a neuron Computational.
IE 585 History of Neural Networks & Introduction to Simple Learning Rules.
1 Perceptron as one Type of Linear Discriminants IntroductionIntroduction Design of Primitive UnitsDesign of Primitive Units PerceptronsPerceptrons.
Perceptrons Michael J. Watts
Previous Lecture Perceptron W  t+1  W  t  t  d(t) - sign (w(t)  x)] x Adaline W  t+1  W  t  t  d(t) - f(w(t)  x)] f’ x Gradient.
Artificial Intelligence Methods Neural Networks Lecture 3 Rakesh K. Bissoondeeal Rakesh K. Bissoondeeal.
1 Neural networks 2. 2 Introduction: Neural networks The nervous system contains 10^12 interconnected neurons.
Computational Intelligence Semester 2 Neural Networks Lecture 2 out of 4.
Pattern Recognition Lecture 20: Neural Networks 3 Dr. Richard Spillman Pacific Lutheran University.
Neural networks.
Fall 2004 Backpropagation CS478 - Machine Learning.
Artificial neural networks:
Other Classification Models: Neural Network
Real Neurons Cell structures Cell body Dendrites Axon
with Daniel L. Silver, Ph.D. Christian Frey, BBA April 11-12, 2017
CS621: Artificial Intelligence
Hebb and Perceptron.
Data Mining with Neural Networks (HK: Chapter 7.5)
Lecture 9 MLP (I): Feed-forward Model
Lecture 11. MLP (III): Back-Propagation
Neural Networks Advantages Criticism
Chapter 3. Artificial Neural Networks - Introduction -
CSE (c) S. Tanimoto, 2004 Neural Networks
of the Artificial Neural Networks.
Artificial Intelligence Chapter 3 Neural Networks
Perceptron as one Type of Linear Discriminants
Neural Network - 2 Mayank Vatsa
CSE (c) S. Tanimoto, 2001 Neural Networks
Lecture Notes for Chapter 4 Artificial Neural Networks
Artificial Intelligence Chapter 3 Neural Networks
Backpropagation.
CSE (c) S. Tanimoto, 2002 Neural Networks
Artificial Intelligence Chapter 3 Neural Networks
Artificial Intelligence Chapter 3 Neural Networks
CSE (c) S. Tanimoto, 2007 Neural Nets
Pattern Recognition: Statistical and Neural
Artificial Intelligence Chapter 3 Neural Networks
Outline Announcement Neural networks Perceptrons - continued
Presentation transcript:

-Artificial Neural Network- Perceptron (感知器) 朝陽科技大學 資訊管理系 李麗華 教授

Outline History Structure Learning Process Recall Process Solving OR Problem Solving AND Problem Solving XOR Problem 朝陽科技大學 李麗華 教授

History of Perceptron Model In 1957, Rosenblatt and several other researchers developed perceptron, which used the similar network as proposed by McCulloch and the learning rule for training network to solve pattern recognition problem. (*) But, this model was later criticized by Minsky (1969) who proved that it cannot solve the XOR problem. In 1986, Rumelhart et al. proposed the Generalized Delta rule and the XOR problem were then solved. 請回家詳看維基介紹 http://en.wikipedia.org/wiki/Frank_Rosenblatt 朝陽科技大學 李麗華 教授

The Network Structure The network structure includes: Input layer: input variables with binary type information. The number of node depends on the problem dimension. Processing node: uses linear activation function, i.e., , and the Bias is used. Output layer: the computed results is generated through transfer function. Transfer Function: discrete type, i.e., step function. 1.0 0.0 朝陽科技大學 李麗華 教授

Perceptron network structure or we use Yj W11 f1 X1 W13 W12 f3 Y1 W21 f2 W23 X2 W22 ※The sub-indexing is designed based on your numbering rule. 朝陽科技大學 李麗華 教授

The training process The training steps: (One layer at a time) Choose the network layer, nodes, and connections. Randomly assign weights: Wij & bias: Input training sets Xi (preparing Tj for verification ) Training computation: 1.0 0.0 netj 1 net j > 0 if Yj= 0 net j 0 朝陽科技大學 李麗華 教授

The training process 5. Training computation: If than: Update weights and bias : 6. repeat steps 3 ~step 5 until every input pattern is satisfied as: 朝陽科技大學 李麗華 教授

The recall process After the network has trained as mentioned above, any input vector X can be send into the Perceptron network to derive the computed output. The ratio of total number of corrected output is treated as the prediction performance of the network. The trained weights, Wij, and the bias, θj , is used to derive netj and, therefore, the output Yj can be obtained for pattern recognition (or for prediction). 朝陽科技大學 李麗華 教授

Example: Using Perceptron to Solve the OR problem Let the training patterns are used as follow. X1 X2 T 1 W11 W21 X2 X1 Y X1 X2 f 朝陽科技大學 李麗華 教授

Training process to recognize OR(1) SOL: Let W11=1, W21=0.5, Θ=0.5 , and η=0.1 The initial net function is as follows. net = W11•X1+ W21•X2-Θ net = 1•X11 + 0.5•X21 - 0.5 (apply the weights) Feed the input pattern into network one by one (0,0), net= -0.5, Y=0, (T-Y) = 0 (ˇ) pass (0,1), net= 0, Y= 0, (T-Y) =1-Ø=1 (X) update weights update weights for pattern (0,1) which is not satisfying the expected output. ΔW11= (0.1)(1)( 0) = 0, W11= W11+ ΔW11 =1 ΔW12= (0.1)(1)( 1) = 0.1, W21= 0.5 + 0.1 =0.6 ΔΘ = -(0.1)(1) =-0.1, Θ = 0.5 - 0.1 =0.4 W11 W21 X2 X1 Y 朝陽科技大學 李麗華 教授

Training process to recognize OR(2) Applying new weights to the net function. net=1•X1+0.6•X2-0.4 Verify the pattern (0,1) to see if it satisfies the expected output. (0,1), net= 0.2, Y= 1, (T-Y) =Ø (V) pass Keep feeding the net pattern into network one by one. (1,0), net= 0.6, Y=1, (T-Y) =Ø (V) pass (1,1), net= 1.2, Y=1, (T-Y) =Ø (V) pass 朝陽科技大學 李麗華 教授

Training process to recognize OR(3) Since the first pattern(0,0) has not been testified with the new weights, therefor, we need to feed the first pattern again. (0,0), net= -0.4, Y=Ø, (T-Y) =Ø (V) pass Now, all the patterns are satisfied the expected output. Hence, the network is successfully trained for understanding the OR problem(pattern). We now obtained the pattern recognition function for OR pattern based on perceptron model: net= X1 + 0.6X2 - 0.4 (*)This is not the only solution. Other solutions are possible. The various solution is due to the initial weights. 朝陽科技大學 李麗華 教授

The Trained OR Network & Recall The trained network is formed as follow. Θ=0.4 X2 X1 1 0.6 Y Recall process: Once the network is trained, we can apply any two element vectors as a pattern and feed the pattern into the network for recognition. For example, we can feed (1,0) into to the network (1,0), net= 0.6, Y=1 Therefore, this pattern is recognized as 1. Now, we say this network is ready for recognizing the OR problem. 朝陽科技大學 李麗華 教授

Example: Solving the AND problem This is a problem for recognizing the AND pattern Let the training patterns are used as follow f1 X2 X1 X1 X2 T 1 (1,1) (0,1) (0,0) (1,0) 朝陽科技大學 李麗華 教授

Training process to recognize AND(1) Let W11=0.5, W21=0.5, Θ=1, Let η=0.1 The initial net function is: net =0.5X11+0.5X21 – 1 Feed the input pattern into network one by one (0,0), net=-1, Y=Ø, (T-Y) =Ø (ˇ) pass (0,1), net=-0.5, Y= Ø, (T-Y) =Ø (ˇ) pass (1,0), net=- 0.5, Y= Ø, (T-Y) =Ø (ˇ) pass (1,1), net= Ø, Y= Ø, (T-Y) = 1 (X) update weights 朝陽科技大學 李麗華 教授

Training process to recognize AND(2) update weights for pattern (1,1) which does not satisfying the expected output: ΔW11=(0,1)(1)( 1)= 0.1, update W11=0.6 ΔW21=(0,1)(1)( 1)= 0.1, update W21=0.5+0.1=0.6, Δ Θ =-(0.1)(1)=-0.1, update Θ =1-0.1=0.9 Applying new weights to the net function: net=0.6X1 + 0.6X2 - 0.9 Verify the pattern (1,1) to see if it satisfies the expected output. (1,1), net= 0.3, Y= 1, (T-Y) =Ø (ˇ) pass 朝陽科技大學 李麗華 教授

Training process to recognize AND(3) Since the previous patterns are not testified with the new weights, feed them again. (0,0), net=-0.9, Y=Ø, (T-Y) =Ø (ˇ) pass (0,1), net=-0.3, Y= Ø, (T-Y) =Ø (ˇ) pass (1,0), net=- 0.3, Y= Ø, (T-Y) =Ø (ˇ) pass We can generate the pattern recognition function for OR pattern is: net= 0.6X1 + 0.6X2 - 0.9 (*)This is not the only solution. Other solutions are possible. The various solution is due to the initial weights. 朝陽科技大學 李麗華 教授

The Trained AND Network & Recall The trained network is formed as follow: Θ=0.9 X2 X1 0.6 Y Now you can send any binary input pattern into this trained AND network. The computing process will bring you the correct answer. 朝陽科技大學 李麗華 教授

Example: Solving the XOR problem(1) Let the training patterns are used as follow. X1 X2 T 1 P2 P4 P3 f2 P1 X2 X1 f1 f3 f1 P2,P3 P4 f2 P1 Now, we are running into trouble, because we need at least two lines for recognizing the XOR data patterns. But the network we learned before, i.e., “OR” or “AND” network, cannot recognize this nonlinear problem. 朝陽科技大學 李麗華 教授

Solving the XOR problem(2) Minsky did prove the single layer perceptron cannot solve the XOR problem. However, perceptron can be extended into multi-layer for solving the higher dimension or multiple function problem. Now, we can solve XOR problem by using [ AND net(f1) + OR net(f2) ]  net(f1&f2)  y Θ3 f3 f1 f2 W21 W12 X2 X1 W11 W22 Θ1 Θ2 AND OR XOR y 朝陽科技大學 李麗華 教授

Solving the XOR problem(3) Let us use the previous weights result from trained AND network (f1) for W11, W21, andΘ1. Let us use the previous weights result from trained OR network (f2) for W12, W22, and Θ2 Now, we uses the output of f1 and f2 for next layer process. Θ3 f3 f1 f2 W21=0.6 W12=1 X2 X1 W11 =0.6 W22=0.6 Θ1=0.9 Θ2=0.4 AND OR XOR y 朝陽科技大學 李麗華 教授

Solving the XOR problem(4) The following pattern is formed. Let W13=0.1, W23=0.4, Θ3=0.4 The previous trained net function for node f1 and node f2 are: f1 = 0.6X11+ 0.6X21 - 0.9 f2 = 1•X12+ 0.6•X22 - 0.4 X1 X2 T1 AND(f1) T2 OR (f2) T3 1 Θ3=0.4 f3 f1 f2 W21=0.6 W12=1 X2 X1 W11 =0.6 W22=0.6 Θ1=0.9 Θ2=0.4 AND OR XOR W13 =0.1 W23=0.4 朝陽科技大學 李麗華 教授

Solving the XOR problem(5) Now we need to feed the input, one by one, for training the network. We do the recall for f1 and f2 separately. This is to satisfying the expected output for f1 using T1 and for f2 using T2. Finally, we use f1 and f2 as input pattern to train the node f3, the result is f3=-0.2•X13 + 0.5X23 - 0.3 Θ1=0.9 W11 =0.6 X1 f1 AND W13 = -0.2 W12=1 W21=0.6 XOR f3 f2 X2 OR Θ3=0.3 W23=0.5 W22=0.6 Θ2=0.4 朝陽科技大學 李麗華 教授

Deriving AND(f1) weights using Excel AND NET (f1)  X1 X2 W11 W21 θ2 net1 Y1(f1) T1 T1 - Y1 △W11 △W21 △θ2 η 0.5 1 -1 0.1 pass -0.5 -0.1 <=update weight 0.6 0.9 0.3 verify -0.9 -0.3 朝陽科技大學 李麗華 教授

Deriving OR(f2) weights using Excel OR NET (f2) X1 X2 W21 W22 θ1 net2 Y2(f2) T2 T2 - Y2 △W12 △W22 △θ1 η 1 0.5 -0.5 0.1 pass -0.1 <=update weight 0.6 0.4 0.2 verify 1.2 朝陽科技大學 李麗華 教授

Deriving XOR(f3) weights using Excel XOR NET (f3) f1 f2 W13 W23 θ3 net3 Y3(f3) T3 T3 - Y3 △W13 △W23 △θ3 η 0.1 0.4 -0.4 pass 1 -0.1 <=update weight 0.5 0.3 -1 0.2 -0.2 -0.3 朝陽科技大學 李麗華 教授