SlideShare a Scribd company logo
1 of 20
Multi Layer Perceptron
Threshold Logic Unit (TLU)

x1
x2
xn
.
.
.
w1
w2
wn
a=i=1
n wi xi
1 if a  q
y=
0 if a < q
y
{
inputs
weights
activation output
q
Activation Functions
a
y
a
y
a
y
a
y
threshold linear
piece-wise linear sigmoid
Decision Surface of a TLU
x1
x2
Decision line
w1 x1 + w2 x2 = q
w
1
1 1
0
0
0
0
0
1
Threshold as Weight

x1
x2
xn
.
.
.
w1
w2
wn
wn+1
xn+1=-1
a= i=1
n+1 wi xi
y
1 if a  0
y=
0 if a <0
{
q=wn+1
Training ANNs
• Training set S of examples {x,t}
– x is an input vector and
– t the desired target vector
– Example: Logical And
S = {(0,0),0}, {(0,1),0}, {(1,0),0}, {(1,1),1}
• Iterative process
– Present a training example x , compute network
output y , compare output y with target t, adjust
weights and thresholds
• Learning rule
– Specifies how to change the weights w and
thresholds q of the network as a function of the inputs
x, output y and target t.
Perceptron Learning Rule
• w’=w + a (t-y) x
Or in components
• w’i = wi + Dwi = wi + a (t-y) xi (i=1..n+1)
With wn+1 = q and xn+1=-1
• The parameter a is called the learning rate. It
determines the magnitude of weight updates
Dwi .
• If the output is correct (t=y) the weights are
not changed (Dwi =0).
• If the output is incorrect (t  y) the weights wi
are changed such that the output of the TLU
for the new weights w’i is closer/further to the
input xi.
Perceptron Training Algorithm
Repeat
for each training vector pair (x,t)
evaluate the output y when x is the input
if yt then
form a new weight vector w’ according
to w’=w + a (t-y) x
else
do nothing
end if
end for
Until y=t for all training vector pairs
Perceptron Convergence Theorem
The algorithm converges to the correct
classification
–if the training data is linearly separable
–and  is sufficiently small
• If two classes of vectors X1 and X2 are linearly
separable, the application of the perceptron
training algorithm will eventually result in a
weight vector w0, such that w0 defines a TLU
whose decision hyper-plane separates X1 and X2
(Rosenblatt 1962).
• Solution w0 is not unique, since if w0 x =0 defines
a hyper-plane, so does w’0 = k w0.
Linear Unit

x1
x2
xn
.
.
.
w1
w2
wn
a=i=1
n wi xi
y
y= a = i=1
n wi xi
inputs
weights
activation output
Gradient Descent Learning Rule
• Consider linear unit without threshold and
continuous output o (not just –1,1)
–o=w0 + w1 x1 + … + wn xn
• Train the wi’s such that they minimize the
squared error
–E[w1,…,wn] = ½ dD (td-od)2
where D is the set of training examples
Gradient Descent
D={<(1,1),1>,<(-1,-1),1>,
<(1,-1),-1>,<(-1,1),-1>}
Gradient:
E[w]=[E/w0,… E/wn]
(w1,w2)
(w1+Dw1,w2 +Dw2)
Dw=- E[w]
Dwi=- E/wi
=/wi 1/2d(td-od)2
= /wi 1/2d(td-i wi xi)2
= d(td- od)(-xi)
Incremental Stochastic Gradient
Descent
• Batch mode : gradient descent
w=w -  ED[w] over the entire data D
ED[w]=1/2d(td-od)2
• Incremental mode: gradient descent
w=w -  Ed[w] over individual training examples d
Ed[w]=1/2 (td-od)2
Incremental Gradient Descent can approximate Batch
Gradient Descent arbitrarily closely if  is small
enough
Perceptron vs. Gradient Descent Rule
• perceptron rule
w’i = wi + a (tp-yp) xi
p
derived from manipulation of decision
surface.
• gradient descent rule
w’i = wi + a (tp-yp) xi
p
derived from minimization of error function
E[w1,…,wn] = ½ p (tp-yp)2
by means of gradient descent.
Where is the big difference?
Perceptron vs. Gradient Descent Rule
Perceptron learning rule guaranteed to succeed if
• Training examples are linearly separable
• Sufficiently small learning rate 
Linear unit training rules uses gradient descent
• Guaranteed to converge to hypothesis with
minimum squared error
• Given sufficiently small learning rate 
• Even when training data contains noise
• Even when training data not separable by H
Presentation of Training Examples
• Presenting all training examples once to
the ANN is called an epoch.
• In incremental stochastic gradient
descent training examples can be
presented in
–Fixed order (1,2,3…,M)
–Randomly permutated order
(5,2,7,…,3)
–Completely random (4,1,7,1,5,4,……)
Neuron with Sigmoid-Function

x1
x2
xn
.
.
.
w1
w2
wn
a=i=1
n wi xi
y=s(a) =1/(1+e-a)
y
inputs
weights
activation output
Sigmoid Unit

x1
x2
xn
.
.
.
w1
w2
wn
w0
x0=-1
a=i=0
n wi xi
y
y=s(a)=1/(1+e-a)
s(x) is the sigmoid function: 1/(1+e-x)
ds(x)/dx= s(x) (1- s(x))
Derive gradient decent rules to train:
• one sigmoid function
E/wi = -p(tp-y) y (1-y) xi
p
• Multilayer networks of sigmoid units
backpropagation:
Applications of neural networks
• Alvinn (the neural network that learns to drive a van from camera
inputs).
• NETtalk: a network that learns to pronounce English text.
• Recognizing hand-written zip codes.
• Lots of applications in financial time series analysis.
Generalization
How can we control number of effective weights?
• Manually or automatically select optimum number of
hidden nodes and connections
• Prevent over-fitting = over-training
• Add a weight-cost term to the bp error equation

More Related Content

Similar to Lecture9April2020_time_11_55amto12_50pm(Neural_network_PPT).pptx

Similar to Lecture9April2020_time_11_55amto12_50pm(Neural_network_PPT).pptx (20)

Machine Learning.pdf
Machine Learning.pdfMachine Learning.pdf
Machine Learning.pdf
 
Lec1 01
Lec1 01Lec1 01
Lec1 01
 
Machine learning with neural networks
Machine learning with neural networksMachine learning with neural networks
Machine learning with neural networks
 
Artificial Neural Network
Artificial Neural NetworkArtificial Neural Network
Artificial Neural Network
 
NN-Ch2.PDF
NN-Ch2.PDFNN-Ch2.PDF
NN-Ch2.PDF
 
MLHEP 2015: Introductory Lecture #1
MLHEP 2015: Introductory Lecture #1MLHEP 2015: Introductory Lecture #1
MLHEP 2015: Introductory Lecture #1
 
AI Lesson 38
AI Lesson 38AI Lesson 38
AI Lesson 38
 
Lesson 38
Lesson 38Lesson 38
Lesson 38
 
5.n nmodels i
5.n nmodels i5.n nmodels i
5.n nmodels i
 
Artificial Neural Networks
Artificial Neural NetworksArtificial Neural Networks
Artificial Neural Networks
 
Nn3
Nn3Nn3
Nn3
 
Optimization tutorial
Optimization tutorialOptimization tutorial
Optimization tutorial
 
Error analysis statistics
Error analysis   statisticsError analysis   statistics
Error analysis statistics
 
Naville's Interpolation
Naville's InterpolationNaville's Interpolation
Naville's Interpolation
 
ann-ics320Part4.ppt
ann-ics320Part4.pptann-ics320Part4.ppt
ann-ics320Part4.ppt
 
ann-ics320Part4.ppt
ann-ics320Part4.pptann-ics320Part4.ppt
ann-ics320Part4.ppt
 
Support Vector Machines Simply
Support Vector Machines SimplySupport Vector Machines Simply
Support Vector Machines Simply
 
Support vector machine
Support vector machineSupport vector machine
Support vector machine
 
Support vector machines
Support vector machinesSupport vector machines
Support vector machines
 
linear SVM.ppt
linear SVM.pptlinear SVM.ppt
linear SVM.ppt
 

More from VAIBHAVSAHU55

VAIBHAV_SAHU_079hdjdjdbvddddhdhdbdbdhdhhd
VAIBHAV_SAHU_079hdjdjdbvddddhdhdbdbdhdhhdVAIBHAV_SAHU_079hdjdjdbvddddhdhdbdbdhdhhd
VAIBHAV_SAHU_079hdjdjdbvddddhdhdbdbdhdhhdVAIBHAVSAHU55
 
Pagajdhvdhdhdvhdhdhdhdhhdhdududhjdjdjdjdjdj
PagajdhvdhdhdvhdhdhdhdhhdhdududhjdjdjdjdjdjPagajdhvdhdhdvhdhdhdhdhhdhdududhjdjdjdjdjdj
PagajdhvdhdhdvhdhdhdhdhhdhdududhjdjdjdjdjdjVAIBHAVSAHU55
 
Shri Ramswaroop Memorial University.pdf.pdf
Shri Ramswaroop Memorial University.pdf.pdfShri Ramswaroop Memorial University.pdf.pdf
Shri Ramswaroop Memorial University.pdf.pdfVAIBHAVSAHU55
 
WhatsADayhshdbdbjdhdhdbdhdjhdhdjdjdjdjjdjdjdndn
WhatsADayhshdbdbjdhdhdbdhdjhdhdjdjdjdjjdjdjdndnWhatsADayhshdbdbjdhdhdbdhdjhdhdjdjdjdjjdjdjdndn
WhatsADayhshdbdbjdhdhdbdhdjhdhdjdjdjdjjdjdjdndnVAIBHAVSAHU55
 
NUMERICAL ANALYSIS.pdf
NUMERICAL ANALYSIS.pdfNUMERICAL ANALYSIS.pdf
NUMERICAL ANALYSIS.pdfVAIBHAVSAHU55
 
numericalmethods-170312161845.pdf
numericalmethods-170312161845.pdfnumericalmethods-170312161845.pdf
numericalmethods-170312161845.pdfVAIBHAVSAHU55
 
AE DIGITAL NOTES.pdf
AE DIGITAL NOTES.pdfAE DIGITAL NOTES.pdf
AE DIGITAL NOTES.pdfVAIBHAVSAHU55
 
Engineering Ethics.pdf
Engineering Ethics.pdfEngineering Ethics.pdf
Engineering Ethics.pdfVAIBHAVSAHU55
 
Unit-2_BJT opn, bias, switch & Amp_complete.pdf
Unit-2_BJT opn, bias, switch & Amp_complete.pdfUnit-2_BJT opn, bias, switch & Amp_complete.pdf
Unit-2_BJT opn, bias, switch & Amp_complete.pdfVAIBHAVSAHU55
 

More from VAIBHAVSAHU55 (11)

VAIBHAV_SAHU_079hdjdjdbvddddhdhdbdbdhdhhd
VAIBHAV_SAHU_079hdjdjdbvddddhdhdbdbdhdhhdVAIBHAV_SAHU_079hdjdjdbvddddhdhdbdbdhdhhd
VAIBHAV_SAHU_079hdjdjdbvddddhdhdbdbdhdhhd
 
Pagajdhvdhdhdvhdhdhdhdhhdhdududhjdjdjdjdjdj
PagajdhvdhdhdvhdhdhdhdhhdhdududhjdjdjdjdjdjPagajdhvdhdhdvhdhdhdhdhhdhdududhjdjdjdjdjdj
Pagajdhvdhdhdvhdhdhdhdhhdhdududhjdjdjdjdjdj
 
Shri Ramswaroop Memorial University.pdf.pdf
Shri Ramswaroop Memorial University.pdf.pdfShri Ramswaroop Memorial University.pdf.pdf
Shri Ramswaroop Memorial University.pdf.pdf
 
WhatsADayhshdbdbjdhdhdbdhdjhdhdjdjdjdjjdjdjdndn
WhatsADayhshdbdbjdhdhdbdhdjhdhdjdjdjdjjdjdjdndnWhatsADayhshdbdbjdhdhdbdhdjhdhdjdjdjdjjdjdjdndn
WhatsADayhshdbdbjdhdhdbdhdjhdhdjdjdjdjjdjdjdndn
 
Jingle bell.pdf
Jingle bell.pdfJingle bell.pdf
Jingle bell.pdf
 
NUMERICAL ANALYSIS.pdf
NUMERICAL ANALYSIS.pdfNUMERICAL ANALYSIS.pdf
NUMERICAL ANALYSIS.pdf
 
numericalmethods-170312161845.pdf
numericalmethods-170312161845.pdfnumericalmethods-170312161845.pdf
numericalmethods-170312161845.pdf
 
OS Content.pdf
OS Content.pdfOS Content.pdf
OS Content.pdf
 
AE DIGITAL NOTES.pdf
AE DIGITAL NOTES.pdfAE DIGITAL NOTES.pdf
AE DIGITAL NOTES.pdf
 
Engineering Ethics.pdf
Engineering Ethics.pdfEngineering Ethics.pdf
Engineering Ethics.pdf
 
Unit-2_BJT opn, bias, switch & Amp_complete.pdf
Unit-2_BJT opn, bias, switch & Amp_complete.pdfUnit-2_BJT opn, bias, switch & Amp_complete.pdf
Unit-2_BJT opn, bias, switch & Amp_complete.pdf
 

Recently uploaded

Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxhumanexperienceaaa
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 

Recently uploaded (20)

Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 

Lecture9April2020_time_11_55amto12_50pm(Neural_network_PPT).pptx

  • 2. Threshold Logic Unit (TLU)  x1 x2 xn . . . w1 w2 wn a=i=1 n wi xi 1 if a  q y= 0 if a < q y { inputs weights activation output q
  • 4. Decision Surface of a TLU x1 x2 Decision line w1 x1 + w2 x2 = q w 1 1 1 0 0 0 0 0 1
  • 5. Threshold as Weight  x1 x2 xn . . . w1 w2 wn wn+1 xn+1=-1 a= i=1 n+1 wi xi y 1 if a  0 y= 0 if a <0 { q=wn+1
  • 6. Training ANNs • Training set S of examples {x,t} – x is an input vector and – t the desired target vector – Example: Logical And S = {(0,0),0}, {(0,1),0}, {(1,0),0}, {(1,1),1} • Iterative process – Present a training example x , compute network output y , compare output y with target t, adjust weights and thresholds • Learning rule – Specifies how to change the weights w and thresholds q of the network as a function of the inputs x, output y and target t.
  • 7. Perceptron Learning Rule • w’=w + a (t-y) x Or in components • w’i = wi + Dwi = wi + a (t-y) xi (i=1..n+1) With wn+1 = q and xn+1=-1 • The parameter a is called the learning rate. It determines the magnitude of weight updates Dwi . • If the output is correct (t=y) the weights are not changed (Dwi =0). • If the output is incorrect (t  y) the weights wi are changed such that the output of the TLU for the new weights w’i is closer/further to the input xi.
  • 8. Perceptron Training Algorithm Repeat for each training vector pair (x,t) evaluate the output y when x is the input if yt then form a new weight vector w’ according to w’=w + a (t-y) x else do nothing end if end for Until y=t for all training vector pairs
  • 9. Perceptron Convergence Theorem The algorithm converges to the correct classification –if the training data is linearly separable –and  is sufficiently small • If two classes of vectors X1 and X2 are linearly separable, the application of the perceptron training algorithm will eventually result in a weight vector w0, such that w0 defines a TLU whose decision hyper-plane separates X1 and X2 (Rosenblatt 1962). • Solution w0 is not unique, since if w0 x =0 defines a hyper-plane, so does w’0 = k w0.
  • 10. Linear Unit  x1 x2 xn . . . w1 w2 wn a=i=1 n wi xi y y= a = i=1 n wi xi inputs weights activation output
  • 11. Gradient Descent Learning Rule • Consider linear unit without threshold and continuous output o (not just –1,1) –o=w0 + w1 x1 + … + wn xn • Train the wi’s such that they minimize the squared error –E[w1,…,wn] = ½ dD (td-od)2 where D is the set of training examples
  • 12. Gradient Descent D={<(1,1),1>,<(-1,-1),1>, <(1,-1),-1>,<(-1,1),-1>} Gradient: E[w]=[E/w0,… E/wn] (w1,w2) (w1+Dw1,w2 +Dw2) Dw=- E[w] Dwi=- E/wi =/wi 1/2d(td-od)2 = /wi 1/2d(td-i wi xi)2 = d(td- od)(-xi)
  • 13. Incremental Stochastic Gradient Descent • Batch mode : gradient descent w=w -  ED[w] over the entire data D ED[w]=1/2d(td-od)2 • Incremental mode: gradient descent w=w -  Ed[w] over individual training examples d Ed[w]=1/2 (td-od)2 Incremental Gradient Descent can approximate Batch Gradient Descent arbitrarily closely if  is small enough
  • 14. Perceptron vs. Gradient Descent Rule • perceptron rule w’i = wi + a (tp-yp) xi p derived from manipulation of decision surface. • gradient descent rule w’i = wi + a (tp-yp) xi p derived from minimization of error function E[w1,…,wn] = ½ p (tp-yp)2 by means of gradient descent. Where is the big difference?
  • 15. Perceptron vs. Gradient Descent Rule Perceptron learning rule guaranteed to succeed if • Training examples are linearly separable • Sufficiently small learning rate  Linear unit training rules uses gradient descent • Guaranteed to converge to hypothesis with minimum squared error • Given sufficiently small learning rate  • Even when training data contains noise • Even when training data not separable by H
  • 16. Presentation of Training Examples • Presenting all training examples once to the ANN is called an epoch. • In incremental stochastic gradient descent training examples can be presented in –Fixed order (1,2,3…,M) –Randomly permutated order (5,2,7,…,3) –Completely random (4,1,7,1,5,4,……)
  • 17. Neuron with Sigmoid-Function  x1 x2 xn . . . w1 w2 wn a=i=1 n wi xi y=s(a) =1/(1+e-a) y inputs weights activation output
  • 18. Sigmoid Unit  x1 x2 xn . . . w1 w2 wn w0 x0=-1 a=i=0 n wi xi y y=s(a)=1/(1+e-a) s(x) is the sigmoid function: 1/(1+e-x) ds(x)/dx= s(x) (1- s(x)) Derive gradient decent rules to train: • one sigmoid function E/wi = -p(tp-y) y (1-y) xi p • Multilayer networks of sigmoid units backpropagation:
  • 19. Applications of neural networks • Alvinn (the neural network that learns to drive a van from camera inputs). • NETtalk: a network that learns to pronounce English text. • Recognizing hand-written zip codes. • Lots of applications in financial time series analysis.
  • 20. Generalization How can we control number of effective weights? • Manually or automatically select optimum number of hidden nodes and connections • Prevent over-fitting = over-training • Add a weight-cost term to the bp error equation