SlideShare a Scribd company logo
1 of 22
Soft Computing: Artificial Neural
Networks-Back propagation
Dr. Baljit Singh Khehra
Professor
CSE Department
Baba Banda Singh Bahadur Engineering College
Fatehgarh Sahib-140407, Punjab, India
Multilayer NNs
Backpropagation Algorithm
 Single Perceptrons can only solve linear problems.
 To solve non-linear problem, multilayer networks learned by the
Backpropagation algorithm are more important .
 Backpropagation
– A systematic method of training multilayer ANNs.
– Built on high mathematical foundation and very good application potential.
– A multilayer forward network using extend gradient-descent based delta-learning rule,
commonly known as back propagation (of errors) rule.
– Provides a computationally efficient method for changing the weights in a feed forward
network, with differentiable activation function units, to learn a training set of input-
output examples.
– Supervise learning.
Back propagation Training Algorithm
Training a network by back propagation involves four stages:
 Initialization of weights and bias.
 The Feed forward of input training pattern.
 The back propagation of associated error.
 The adjustment of weights.
Architecture of Multilayer NNs
Backpropagation Algorithm
Backpropagation Training Algorithm
Initialization
Step1. Initialize weights and bias .
(Set to small random values)
Step2. While stopping condition is not satisfied,
do Steps 3-10.
Step3. For each training pair, do Steps 4-9
Feed forward :
Step 4.Each input unit (Xi, i = 1, …..,n ) receives input signal xi and
broadcasts this signal to all units in the layer above (the hidden units).
Step 5. Each hidden unit (Zj, j = 1, …..p ) sums its weighted input signals
applies its activation function to compute its output signal
zj = f (z_inj,),and sends this signal to all units in the layer above
(output units).


n
i
ijiojj vxnvinz
1
_
Backpropagation Training Algorithm
Step 6. Each output unit (Yk, k = 1, ….,m ) sums its weighted input signals,
and applies its activation function to compute its output signal ,
yk = f (y_ink).
Backpropagation of error :
Step7. Each output unit (Yk, k =1,…..,m) receives a target pattern
corresponding to the input training pattern, computes its error information
term,
k = (tk – yk) f' (y_ink),
calculates its weight correction term (used to update wjk later).
wjk =αkzj,
calculates its bias correction term (used to up date wok later).
wok = ak, and sends k to units in the layer below .


p
j
jkjokk wzwiny
1
_
Backpropagation Training Algorithm
Step 8. Each hidden unit (Zj, j = 1,……… p) sums its delta inputs (from units in
the layer above),
multiplies by the derivative of its activation function to calculate its error
information term.
j = _inj f' (z_inj),
calculates its weight correction term (used to update vij later),
vij = ajxi,
and calculates its bias correction term (used to update voj later),
voj = aj,


m
k
jkkj win
1
_ 
Backpropagation Training Algorithm
Update weights and biases :
Step 9.Each output unit (Yk, k =1,……,m) updates its bias and weights
(j=0……..p) :
wjk (new) =wjk (old) + wjk,
Each hidden unit (Zj, j =1……. p) updates its bias and weights (i =
0,……,n) :
vij (new) = vij (old) + vij.
Step 10. Test stopping condition.
Effects of Learning rate
 Learning rate determines the size of the weight adjustments made at each
iteration and hence influences the rate of convergence.
 Poor choice of learning rate can result in a failure in convergence.
 If learning rate is too large, the search path will oscillate.
 If learning rate is too small, the descent will progress in small steps
significantly increasing the time to converge.
 Optimal selection of learning rate is necessary.
Momentum factor
 Momentum is a parameter that is used to improve the rate of convergance.
 If the momentum is added to the weight update formula, the convergence is
faster.
 Using momentum, the net does not proceed in the direction of the gradient,
but travels in the direction of the combination of the current gradient and
the previous direction for which the weight correction is made.
 The main purpose of momentum is to accelerate the convergence of error
propagation algorithm.
)]1()([)()1(
)]1()([)()1(


tvtvxtvtv
twtwztwtw
ijijijijij
jkjkjkjkjk


Backpropagation for load forecasting in power generation
Architecture of NNs for load forecasting in power generation
Backpropagation training algorithm for load forecasting
Initially weights (Set to small random values)
v=rand(3, p);
v0=rand(1, p);
w=rand(p,1);
w0=rand(1,1);
Convergence =1;
Epoch=0;
While convergence
e=0;
For tp=1 to 7 ( training pairs)
For j=1 to p (hidden units)
z_in(j) =v0(j);
For i=1 to 3 (Input units)
Endfor
z(j) = f (z_in(j),);
Endfor
);,(*),()(_)(_ jivitpXjinzjinz 
Backpropagation training algorithm for load forecasting
Y_in=w0+z*w;
y(tp)=f(y_in) ;
k = (T(tp) – y(tp))* f' (y_in) ;
w =α*k*z;
w0 = a*k,;
;
For j = 1 to p
;
Endfor
For j = 1 to p
For i=1 to n
;
Endfor
Endfor
v0 = aj ;
win kj *_  
))(_('*)1,(_)1,( jinzfjinj jj  
),(*)1,(*),( tpiXjajiv j
Backpropagation training algorithm for load forecasting
%Update weights and biases
w(new) =w (old) + w;
w0(new) =w0 (old) + w0;
v(new) =v (old) + v;
v0(new) =v0 (old) + v0;
Endfor
if e<TSE
convergence=0;
endif
Epoch=Epoch+1;
Endwhile
display (‘ Total Epoch performed’);
display (epoch);
display (‘Error’);
display (e);
display (‘Final weights &bias’);
w(new);
w0(new);
v(new);
v0(new);
    2
tpytpTee 
Activation functions for load Forecasting
 Performance of back propagation algorithm for load forecasting is
measured at two different activation functions:
1. Sigmoid function
Derivative of sigmoid function
2. Hyperbolic tangent function
Derivative of Hyperbolic tangent function
x
e
xf 


1
1
)(
2
'
)1(
)( x
ax
e
ae
xf 



x
x
e
e
xf 2
2
1
1
)( 




22
2
)1(
4
)(' x
x
e
e
xf 



Results
Results
Testing Data for load forecasting
Backpropagation testing algorithm for load forecasting
Let be a matrix which contains data for testing, every row of matrix
represents different testing set. In the proposed study, for testing 5 testing
pairs are considered.
Algorithm:
Calculated weights and bias from training algorithm
;
;
;
;
For tp=1 to 5 ( testing pairs)
For j=1 to p (hidden units)
Z_in(j) =v0(j);
For i=1 to 3 (Input units)
Endfor
35X
pv 3
pv 10
1pw
110 w
);,(*),()(_)(_ jivitpXjinzjinz 
Backpropagation testing algorithm for load forecasting with
Results
z(j) = f (z_in(j),);
Endfor
y_in=w0+z*w;
y(tp)=f(y_in) ;
End
Back propagation

More Related Content

What's hot

Machine learning with ADA Boost
Machine learning with ADA BoostMachine learning with ADA Boost
Machine learning with ADA BoostAman Patel
 
Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...
Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...
Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...Simplilearn
 
2.3 bayesian classification
2.3 bayesian classification2.3 bayesian classification
2.3 bayesian classificationKrish_ver2
 
Understanding Bagging and Boosting
Understanding Bagging and BoostingUnderstanding Bagging and Boosting
Understanding Bagging and BoostingMohit Rajput
 
Ensemble methods in machine learning
Ensemble methods in machine learningEnsemble methods in machine learning
Ensemble methods in machine learningSANTHOSH RAJA M G
 
3.5 model based clustering
3.5 model based clustering3.5 model based clustering
3.5 model based clusteringKrish_ver2
 
Decision Tree Learning
Decision Tree LearningDecision Tree Learning
Decision Tree LearningMilind Gokhale
 
MACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMMACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMPuneet Kulyana
 
Decision trees in Machine Learning
Decision trees in Machine Learning Decision trees in Machine Learning
Decision trees in Machine Learning Mohammad Junaid Khan
 
Machine Learning - Splitting Datasets
Machine Learning - Splitting DatasetsMachine Learning - Splitting Datasets
Machine Learning - Splitting DatasetsAndrew Ferlitsch
 
Image Classification And Support Vector Machine
Image Classification And Support Vector MachineImage Classification And Support Vector Machine
Image Classification And Support Vector MachineShao-Chuan Wang
 
04 Classification in Data Mining
04 Classification in Data Mining04 Classification in Data Mining
04 Classification in Data MiningValerii Klymchuk
 
Cross-validation Tutorial: What, how and which?
Cross-validation Tutorial: What, how and which?Cross-validation Tutorial: What, how and which?
Cross-validation Tutorial: What, how and which?Pradeep Redddy Raamana
 
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic ConceptsData Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic ConceptsSalah Amean
 
Decision Tree - C4.5&CART
Decision Tree - C4.5&CARTDecision Tree - C4.5&CART
Decision Tree - C4.5&CARTXueping Peng
 

What's hot (20)

Naive Bayes
Naive BayesNaive Bayes
Naive Bayes
 
Machine learning with ADA Boost
Machine learning with ADA BoostMachine learning with ADA Boost
Machine learning with ADA Boost
 
Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...
Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...
Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...
 
2.3 bayesian classification
2.3 bayesian classification2.3 bayesian classification
2.3 bayesian classification
 
Understanding Bagging and Boosting
Understanding Bagging and BoostingUnderstanding Bagging and Boosting
Understanding Bagging and Boosting
 
Ensemble methods in machine learning
Ensemble methods in machine learningEnsemble methods in machine learning
Ensemble methods in machine learning
 
3.5 model based clustering
3.5 model based clustering3.5 model based clustering
3.5 model based clustering
 
Perceptron
PerceptronPerceptron
Perceptron
 
Logistic regression
Logistic regressionLogistic regression
Logistic regression
 
Decision tree learning
Decision tree learningDecision tree learning
Decision tree learning
 
Decision Tree Learning
Decision Tree LearningDecision Tree Learning
Decision Tree Learning
 
MACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMMACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHM
 
Lecture13 - Association Rules
Lecture13 - Association RulesLecture13 - Association Rules
Lecture13 - Association Rules
 
Decision trees in Machine Learning
Decision trees in Machine Learning Decision trees in Machine Learning
Decision trees in Machine Learning
 
Machine Learning - Splitting Datasets
Machine Learning - Splitting DatasetsMachine Learning - Splitting Datasets
Machine Learning - Splitting Datasets
 
Image Classification And Support Vector Machine
Image Classification And Support Vector MachineImage Classification And Support Vector Machine
Image Classification And Support Vector Machine
 
04 Classification in Data Mining
04 Classification in Data Mining04 Classification in Data Mining
04 Classification in Data Mining
 
Cross-validation Tutorial: What, how and which?
Cross-validation Tutorial: What, how and which?Cross-validation Tutorial: What, how and which?
Cross-validation Tutorial: What, how and which?
 
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic ConceptsData Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
 
Decision Tree - C4.5&CART
Decision Tree - C4.5&CARTDecision Tree - C4.5&CART
Decision Tree - C4.5&CART
 

Similar to Back propagation

A comparison-of-first-and-second-order-training-algorithms-for-artificial-neu...
A comparison-of-first-and-second-order-training-algorithms-for-artificial-neu...A comparison-of-first-and-second-order-training-algorithms-for-artificial-neu...
A comparison-of-first-and-second-order-training-algorithms-for-artificial-neu...Cemal Ardil
 
Back propagation
Back propagationBack propagation
Back propagationNagarajan
 
nural network ER. Abhishek k. upadhyay
nural network ER. Abhishek  k. upadhyaynural network ER. Abhishek  k. upadhyay
nural network ER. Abhishek k. upadhyayabhishek upadhyay
 
알고리즘 중심의 머신러닝 가이드 Ch04
알고리즘 중심의 머신러닝 가이드 Ch04알고리즘 중심의 머신러닝 가이드 Ch04
알고리즘 중심의 머신러닝 가이드 Ch04HyeonSeok Choi
 
Artificial Neural Networks-Supervised Learning Models
Artificial Neural Networks-Supervised Learning ModelsArtificial Neural Networks-Supervised Learning Models
Artificial Neural Networks-Supervised Learning ModelsDrBaljitSinghKhehra
 
Artificial Neural Networks-Supervised Learning Models
Artificial Neural Networks-Supervised Learning ModelsArtificial Neural Networks-Supervised Learning Models
Artificial Neural Networks-Supervised Learning ModelsDrBaljitSinghKhehra
 
Artificial Neural Networks-Supervised Learning Models
Artificial Neural Networks-Supervised Learning ModelsArtificial Neural Networks-Supervised Learning Models
Artificial Neural Networks-Supervised Learning ModelsDrBaljitSinghKhehra
 
understanding Backpropagation neural networks
understanding Backpropagation neural networksunderstanding Backpropagation neural networks
understanding Backpropagation neural networksKhaled Mo
 
Support Vector Machines for Computing Action Mappings in Learning Classifier ...
Support Vector Machines for Computing Action Mappings in Learning Classifier ...Support Vector Machines for Computing Action Mappings in Learning Classifier ...
Support Vector Machines for Computing Action Mappings in Learning Classifier ...guest9b3f63
 
Implementing the Perceptron Algorithm for Finding the weights of a Linear Dis...
Implementing the Perceptron Algorithm for Finding the weights of a Linear Dis...Implementing the Perceptron Algorithm for Finding the weights of a Linear Dis...
Implementing the Perceptron Algorithm for Finding the weights of a Linear Dis...Dipesh Shome
 
Improving Performance of Back propagation Learning Algorithm
Improving Performance of Back propagation Learning AlgorithmImproving Performance of Back propagation Learning Algorithm
Improving Performance of Back propagation Learning Algorithmijsrd.com
 
Neural network 20161210_jintaekseo
Neural network 20161210_jintaekseoNeural network 20161210_jintaekseo
Neural network 20161210_jintaekseoJinTaek Seo
 
Reinforcement Learning and Artificial Neural Nets
Reinforcement Learning and Artificial Neural NetsReinforcement Learning and Artificial Neural Nets
Reinforcement Learning and Artificial Neural NetsPierre de Lacaze
 

Similar to Back propagation (20)

CS767_Lecture_05.pptx
CS767_Lecture_05.pptxCS767_Lecture_05.pptx
CS767_Lecture_05.pptx
 
A comparison-of-first-and-second-order-training-algorithms-for-artificial-neu...
A comparison-of-first-and-second-order-training-algorithms-for-artificial-neu...A comparison-of-first-and-second-order-training-algorithms-for-artificial-neu...
A comparison-of-first-and-second-order-training-algorithms-for-artificial-neu...
 
parallel
parallelparallel
parallel
 
UofT_ML_lecture.pptx
UofT_ML_lecture.pptxUofT_ML_lecture.pptx
UofT_ML_lecture.pptx
 
Back propagation
Back propagationBack propagation
Back propagation
 
nural network ER. Abhishek k. upadhyay
nural network ER. Abhishek  k. upadhyaynural network ER. Abhishek  k. upadhyay
nural network ER. Abhishek k. upadhyay
 
알고리즘 중심의 머신러닝 가이드 Ch04
알고리즘 중심의 머신러닝 가이드 Ch04알고리즘 중심의 머신러닝 가이드 Ch04
알고리즘 중심의 머신러닝 가이드 Ch04
 
SOFTCOMPUTERING TECHNICS - Unit
SOFTCOMPUTERING TECHNICS - UnitSOFTCOMPUTERING TECHNICS - Unit
SOFTCOMPUTERING TECHNICS - Unit
 
Artificial Neural Networks-Supervised Learning Models
Artificial Neural Networks-Supervised Learning ModelsArtificial Neural Networks-Supervised Learning Models
Artificial Neural Networks-Supervised Learning Models
 
Artificial Neural Networks-Supervised Learning Models
Artificial Neural Networks-Supervised Learning ModelsArtificial Neural Networks-Supervised Learning Models
Artificial Neural Networks-Supervised Learning Models
 
Artificial Neural Networks-Supervised Learning Models
Artificial Neural Networks-Supervised Learning ModelsArtificial Neural Networks-Supervised Learning Models
Artificial Neural Networks-Supervised Learning Models
 
understanding Backpropagation neural networks
understanding Backpropagation neural networksunderstanding Backpropagation neural networks
understanding Backpropagation neural networks
 
Support Vector Machines for Computing Action Mappings in Learning Classifier ...
Support Vector Machines for Computing Action Mappings in Learning Classifier ...Support Vector Machines for Computing Action Mappings in Learning Classifier ...
Support Vector Machines for Computing Action Mappings in Learning Classifier ...
 
04 Multi-layer Feedforward Networks
04 Multi-layer Feedforward Networks04 Multi-layer Feedforward Networks
04 Multi-layer Feedforward Networks
 
Ch2 2011 s
Ch2 2011 sCh2 2011 s
Ch2 2011 s
 
Neural Networks
Neural NetworksNeural Networks
Neural Networks
 
Implementing the Perceptron Algorithm for Finding the weights of a Linear Dis...
Implementing the Perceptron Algorithm for Finding the weights of a Linear Dis...Implementing the Perceptron Algorithm for Finding the weights of a Linear Dis...
Implementing the Perceptron Algorithm for Finding the weights of a Linear Dis...
 
Improving Performance of Back propagation Learning Algorithm
Improving Performance of Back propagation Learning AlgorithmImproving Performance of Back propagation Learning Algorithm
Improving Performance of Back propagation Learning Algorithm
 
Neural network 20161210_jintaekseo
Neural network 20161210_jintaekseoNeural network 20161210_jintaekseo
Neural network 20161210_jintaekseo
 
Reinforcement Learning and Artificial Neural Nets
Reinforcement Learning and Artificial Neural NetsReinforcement Learning and Artificial Neural Nets
Reinforcement Learning and Artificial Neural Nets
 

Recently uploaded

James Joyce, Dubliners and Ulysses.ppt !
James Joyce, Dubliners and Ulysses.ppt !James Joyce, Dubliners and Ulysses.ppt !
James Joyce, Dubliners and Ulysses.ppt !risocarla2016
 
The Ten Facts About People With Autism Presentation
The Ten Facts About People With Autism PresentationThe Ten Facts About People With Autism Presentation
The Ten Facts About People With Autism PresentationNathan Young
 
Call Girls In Aerocity 🤳 Call Us +919599264170
Call Girls In Aerocity 🤳 Call Us +919599264170Call Girls In Aerocity 🤳 Call Us +919599264170
Call Girls In Aerocity 🤳 Call Us +919599264170Escort Service
 
Genesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptxGenesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptxFamilyWorshipCenterD
 
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...NETWAYS
 
Work Remotely with Confluence ACE 2.pptx
Work Remotely with Confluence ACE 2.pptxWork Remotely with Confluence ACE 2.pptx
Work Remotely with Confluence ACE 2.pptxmavinoikein
 
miladyskindiseases-200705210221 2.!!pptx
miladyskindiseases-200705210221 2.!!pptxmiladyskindiseases-200705210221 2.!!pptx
miladyskindiseases-200705210221 2.!!pptxCarrieButtitta
 
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)Basil Achie
 
Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...
Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...
Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...marjmae69
 
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...Salam Al-Karadaghi
 
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...NETWAYS
 
call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@vikas rana
 
Mathan flower ppt.pptx slide orchids ✨🌸
Mathan flower ppt.pptx slide orchids ✨🌸Mathan flower ppt.pptx slide orchids ✨🌸
Mathan flower ppt.pptx slide orchids ✨🌸mathanramanathan2005
 
The 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software EngineeringThe 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software EngineeringSebastiano Panichella
 
OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...
OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...
OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...NETWAYS
 
Dutch Power - 26 maart 2024 - Henk Kras - Circular Plastics
Dutch Power - 26 maart 2024 - Henk Kras - Circular PlasticsDutch Power - 26 maart 2024 - Henk Kras - Circular Plastics
Dutch Power - 26 maart 2024 - Henk Kras - Circular PlasticsDutch Power
 
Simulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with AerialistSimulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with AerialistSebastiano Panichella
 
Genshin Impact PPT Template by EaTemp.pptx
Genshin Impact PPT Template by EaTemp.pptxGenshin Impact PPT Template by EaTemp.pptx
Genshin Impact PPT Template by EaTemp.pptxJohnree4
 
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...Krijn Poppe
 
Event 4 Introduction to Open Source.pptx
Event 4 Introduction to Open Source.pptxEvent 4 Introduction to Open Source.pptx
Event 4 Introduction to Open Source.pptxaryanv1753
 

Recently uploaded (20)

James Joyce, Dubliners and Ulysses.ppt !
James Joyce, Dubliners and Ulysses.ppt !James Joyce, Dubliners and Ulysses.ppt !
James Joyce, Dubliners and Ulysses.ppt !
 
The Ten Facts About People With Autism Presentation
The Ten Facts About People With Autism PresentationThe Ten Facts About People With Autism Presentation
The Ten Facts About People With Autism Presentation
 
Call Girls In Aerocity 🤳 Call Us +919599264170
Call Girls In Aerocity 🤳 Call Us +919599264170Call Girls In Aerocity 🤳 Call Us +919599264170
Call Girls In Aerocity 🤳 Call Us +919599264170
 
Genesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptxGenesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptx
 
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
 
Work Remotely with Confluence ACE 2.pptx
Work Remotely with Confluence ACE 2.pptxWork Remotely with Confluence ACE 2.pptx
Work Remotely with Confluence ACE 2.pptx
 
miladyskindiseases-200705210221 2.!!pptx
miladyskindiseases-200705210221 2.!!pptxmiladyskindiseases-200705210221 2.!!pptx
miladyskindiseases-200705210221 2.!!pptx
 
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)
 
Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...
Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...
Gaps, Issues and Challenges in the Implementation of Mother Tongue Based-Mult...
 
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
 
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
 
call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@
 
Mathan flower ppt.pptx slide orchids ✨🌸
Mathan flower ppt.pptx slide orchids ✨🌸Mathan flower ppt.pptx slide orchids ✨🌸
Mathan flower ppt.pptx slide orchids ✨🌸
 
The 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software EngineeringThe 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software Engineering
 
OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...
OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...
OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...
 
Dutch Power - 26 maart 2024 - Henk Kras - Circular Plastics
Dutch Power - 26 maart 2024 - Henk Kras - Circular PlasticsDutch Power - 26 maart 2024 - Henk Kras - Circular Plastics
Dutch Power - 26 maart 2024 - Henk Kras - Circular Plastics
 
Simulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with AerialistSimulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with Aerialist
 
Genshin Impact PPT Template by EaTemp.pptx
Genshin Impact PPT Template by EaTemp.pptxGenshin Impact PPT Template by EaTemp.pptx
Genshin Impact PPT Template by EaTemp.pptx
 
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
 
Event 4 Introduction to Open Source.pptx
Event 4 Introduction to Open Source.pptxEvent 4 Introduction to Open Source.pptx
Event 4 Introduction to Open Source.pptx
 

Back propagation

  • 1. Soft Computing: Artificial Neural Networks-Back propagation Dr. Baljit Singh Khehra Professor CSE Department Baba Banda Singh Bahadur Engineering College Fatehgarh Sahib-140407, Punjab, India
  • 2. Multilayer NNs Backpropagation Algorithm  Single Perceptrons can only solve linear problems.  To solve non-linear problem, multilayer networks learned by the Backpropagation algorithm are more important .  Backpropagation – A systematic method of training multilayer ANNs. – Built on high mathematical foundation and very good application potential. – A multilayer forward network using extend gradient-descent based delta-learning rule, commonly known as back propagation (of errors) rule. – Provides a computationally efficient method for changing the weights in a feed forward network, with differentiable activation function units, to learn a training set of input- output examples. – Supervise learning.
  • 3. Back propagation Training Algorithm Training a network by back propagation involves four stages:  Initialization of weights and bias.  The Feed forward of input training pattern.  The back propagation of associated error.  The adjustment of weights.
  • 4. Architecture of Multilayer NNs Backpropagation Algorithm
  • 5. Backpropagation Training Algorithm Initialization Step1. Initialize weights and bias . (Set to small random values) Step2. While stopping condition is not satisfied, do Steps 3-10. Step3. For each training pair, do Steps 4-9 Feed forward : Step 4.Each input unit (Xi, i = 1, …..,n ) receives input signal xi and broadcasts this signal to all units in the layer above (the hidden units). Step 5. Each hidden unit (Zj, j = 1, …..p ) sums its weighted input signals applies its activation function to compute its output signal zj = f (z_inj,),and sends this signal to all units in the layer above (output units).   n i ijiojj vxnvinz 1 _
  • 6. Backpropagation Training Algorithm Step 6. Each output unit (Yk, k = 1, ….,m ) sums its weighted input signals, and applies its activation function to compute its output signal , yk = f (y_ink). Backpropagation of error : Step7. Each output unit (Yk, k =1,…..,m) receives a target pattern corresponding to the input training pattern, computes its error information term, k = (tk – yk) f' (y_ink), calculates its weight correction term (used to update wjk later). wjk =αkzj, calculates its bias correction term (used to up date wok later). wok = ak, and sends k to units in the layer below .   p j jkjokk wzwiny 1 _
  • 7. Backpropagation Training Algorithm Step 8. Each hidden unit (Zj, j = 1,……… p) sums its delta inputs (from units in the layer above), multiplies by the derivative of its activation function to calculate its error information term. j = _inj f' (z_inj), calculates its weight correction term (used to update vij later), vij = ajxi, and calculates its bias correction term (used to update voj later), voj = aj,   m k jkkj win 1 _ 
  • 8. Backpropagation Training Algorithm Update weights and biases : Step 9.Each output unit (Yk, k =1,……,m) updates its bias and weights (j=0……..p) : wjk (new) =wjk (old) + wjk, Each hidden unit (Zj, j =1……. p) updates its bias and weights (i = 0,……,n) : vij (new) = vij (old) + vij. Step 10. Test stopping condition.
  • 9. Effects of Learning rate  Learning rate determines the size of the weight adjustments made at each iteration and hence influences the rate of convergence.  Poor choice of learning rate can result in a failure in convergence.  If learning rate is too large, the search path will oscillate.  If learning rate is too small, the descent will progress in small steps significantly increasing the time to converge.  Optimal selection of learning rate is necessary.
  • 10. Momentum factor  Momentum is a parameter that is used to improve the rate of convergance.  If the momentum is added to the weight update formula, the convergence is faster.  Using momentum, the net does not proceed in the direction of the gradient, but travels in the direction of the combination of the current gradient and the previous direction for which the weight correction is made.  The main purpose of momentum is to accelerate the convergence of error propagation algorithm. )]1()([)()1( )]1()([)()1(   tvtvxtvtv twtwztwtw ijijijijij jkjkjkjkjk  
  • 11. Backpropagation for load forecasting in power generation
  • 12. Architecture of NNs for load forecasting in power generation
  • 13. Backpropagation training algorithm for load forecasting Initially weights (Set to small random values) v=rand(3, p); v0=rand(1, p); w=rand(p,1); w0=rand(1,1); Convergence =1; Epoch=0; While convergence e=0; For tp=1 to 7 ( training pairs) For j=1 to p (hidden units) z_in(j) =v0(j); For i=1 to 3 (Input units) Endfor z(j) = f (z_in(j),); Endfor );,(*),()(_)(_ jivitpXjinzjinz 
  • 14. Backpropagation training algorithm for load forecasting Y_in=w0+z*w; y(tp)=f(y_in) ; k = (T(tp) – y(tp))* f' (y_in) ; w =α*k*z; w0 = a*k,; ; For j = 1 to p ; Endfor For j = 1 to p For i=1 to n ; Endfor Endfor v0 = aj ; win kj *_   ))(_('*)1,(_)1,( jinzfjinj jj   ),(*)1,(*),( tpiXjajiv j
  • 15. Backpropagation training algorithm for load forecasting %Update weights and biases w(new) =w (old) + w; w0(new) =w0 (old) + w0; v(new) =v (old) + v; v0(new) =v0 (old) + v0; Endfor if e<TSE convergence=0; endif Epoch=Epoch+1; Endwhile display (‘ Total Epoch performed’); display (epoch); display (‘Error’); display (e); display (‘Final weights &bias’); w(new); w0(new); v(new); v0(new);     2 tpytpTee 
  • 16. Activation functions for load Forecasting  Performance of back propagation algorithm for load forecasting is measured at two different activation functions: 1. Sigmoid function Derivative of sigmoid function 2. Hyperbolic tangent function Derivative of Hyperbolic tangent function x e xf    1 1 )( 2 ' )1( )( x ax e ae xf     x x e e xf 2 2 1 1 )(      22 2 )1( 4 )(' x x e e xf    
  • 19. Testing Data for load forecasting
  • 20. Backpropagation testing algorithm for load forecasting Let be a matrix which contains data for testing, every row of matrix represents different testing set. In the proposed study, for testing 5 testing pairs are considered. Algorithm: Calculated weights and bias from training algorithm ; ; ; ; For tp=1 to 5 ( testing pairs) For j=1 to p (hidden units) Z_in(j) =v0(j); For i=1 to 3 (Input units) Endfor 35X pv 3 pv 10 1pw 110 w );,(*),()(_)(_ jivitpXjinzjinz 
  • 21. Backpropagation testing algorithm for load forecasting with Results z(j) = f (z_in(j),); Endfor y_in=w0+z*w; y(tp)=f(y_in) ; End