SlideShare a Scribd company logo
1 of 66
An Introduction to
Deep Learning
Mehrnaz Faraz
Faculty of Electrical Engineering
K. N. Toosi University of Technology
1
In the name of God
Milad Abbasi
Faculty of Electrical Engineering
Sharif University of Technology
Contents
• Introduction to Fuzzy
• Introduction to Neural Network
2
Introduction to Fuzzy
• Fuzzy: “Difficult to perceive; indistinct or vague”
– Simplicity and flexibility
– Can handle problems with imprecise data
– More readily customizable in natural language terms
3
Introduction to Fuzzy
4
Slowest, 𝐴1 Slow, 𝐴2 Fast, 𝐴3 Fastest, 𝐴4
Subset
0
1
Velocity
𝜇 𝐴
Membership Function
𝜇 𝐴 𝑖
𝑥 : 𝑥 → 0, 1 , i = 1, … , 4
Slowest FastestSlow Fast
Introduction to Fuzzy
• Example: Automatic Braking System
5
Close?
 Is car close? 0.2 (Not very close)
Brakes: 0.2 (Slight pressure)
 Is car close? 0.8 (Pretty close)
Brakes: 0.8 (Fairly heavy pressure)
Introduction to Fuzzy
6
• Well-known Membership Functions:
trimf trapmf
gaussmf sigmf
a b c a b c d
sig
c
Introduction to Fuzzy
7
• Linguistic variables:
• Weather is quite cold.
• Height is almost tall.
• Speed is very high.
• Weather, Height and Speed are linguistic variables.
• Cold, Tall and high are linguistic value.
Introduction to Fuzzy
• Operations with fuzzy sets:
– Complement operation:
– Fuzzy union operation or fuzzy OR:
– Fuzzy intersection operation or fuzzy AND:
8
)(1)( xx AA
 
A( ) s[ ( ), ( )]A B Bx x x   
A( ) t [ ( ), ( )]A B Bx x x   
1
1 2 30 4
1
1 2 30 4
1 2 30 4
1
( )A
x
( )B
x
( )A B
x 
Introduction to Fuzzy
• Fuzzy union operation (s-norm):
9
Max is a s-norm operator
x
x
x
1
1 2 30 4
1
1 2 30 4
1 2 30 4
1
( )A
x
( )B
x
,
( )A B
x
Introduction to Fuzzy
10
• Fuzzy intersection operation (t-norm):
Min is a t-norm operator
Product is another t-norm operator
(Mamdani Implication)
x
x
x
Introduction to Fuzzy
• Other complement operations:
– Sugeno Class:
– Yager Class:
11
 
1
1
a
c a
a





   
1
1 w w
wc a a 
 Aa x
Where:
Introduction to Fuzzy
• Other union operation:
– Yager class:
– Drastic sum:
– Algebraic sum:
12
   
1
, min 1, w w w
ws a b a b
 
  
 
 0,w 
 
, 0
, , 0
1 . .
ds
a b
s a b b a
o w


 


 ,ass a b a b ab  
 Aa x  Bb xWhere:
Introduction to Fuzzy
• Other intersection operation:
– Yager class:
– Drastic product:
– Algebraic product:
13
      
1
, 1 min 1, 1 1
w w w
wt a b a b
 
     
  
 
, 1
, , 1
0 . .
dp
a b
t a b b a
o w


 


 ,apt a b ab
Introduction to Fuzzy
• Example: Assume that we want to evaluate the health of a
person based on his height and weight.
• The input variables are the crisp numbers of the person’s
height and weight.
• Output is percentage of healthiness.
14
Input Output
Fazzifier Defazzifier
Rule Base
Data Base
Inference
Engine
Crisp Number Crisp Number
Introduction to Fuzzy
• Step 1: Fuzzification
15
SlimVery Slim Medium Heavy Very Heavy
50 Kg 75 Kg 100 Kg 125 Kg
Weight
𝜇
1
Very Short Short Medium Tall Very Tall
Height
140 cm 160 cm 180 cm 200 cm
𝜇
1
Input Membership Functions:
Introduction to Fuzzy
• Step 2: Rules
• Rules reflect experts decisions
• Rules can be redundant
• Rules can be adjusted to match desired
• Rules are tabulated as fuzzy words
• If x is A then y is B
• if 𝑥1is 𝐴1 and/or 𝑥2 is 𝐴2 … and/or 𝑥 𝑛 is 𝐴 𝑛 then y is B
16
Introduction to Fuzzy
• Implications:
– Mamdani implication:
17
1 2
1 2
FP FP
IF FP THEN FP
 
   
     1 2
, min ,QMM FP FPx y x y     
     1 2
, ,QMP FP FPx y prod x y     
Introduction to Fuzzy
– Godel implication:
– Zadeh implication:
18
   
 
1 2
2
1 ,
. .
FP FP
QG
FP
x y
y o w
 



 

         1 2 1
, max min , , 1QZ FP FP FPx y x y x      
Introduction to Fuzzy
• Inference Rules:
– Modus Ponens:
– Modus Tollens:
– Hypothetical Syllogism:
19
X is A
Y is B
If X is A then Y is B



Y is not B
X is not A
If X is A then Y is B



If X is A then Y is B
If X is A then Z is C
If Y is B then Z is C



Introduction to Fuzzy
• Rules are tabulated as fuzzy words
– Healthy (H)
– Somewhat healthy (SH)
– Less Healthy (LH)
– Unhealthy (U)
– Rule function f = {U, LH, SH, H}
20
U LH SH H
0.2 0.4 0.6 0.8 1
f
1
Decision
Output Membership Function:
Introduction to Fuzzy
21
Very
Slim
slim Medium Heavy
Very
Heavy
Very Short H SH LH U U
Short SH H SH LH U
Medium LH H H LH U
Tall U SH H SH U
Very Tall U LH H SH LH
WeightHeight
• Fuzzy Rule Table:
Introduction to Fuzzy
• Step 3: Calculation
• Assume that height = 187 cm and weight = 49 kg
22
SlimVery Slim Medium Heavy Very Heavy
50 Kg 75 Kg 100 Kg 125 Kg
Weight
𝜇
1
Very Short Short Medium Tall Very Tall
Height
140 cm 160 cm 180 cm 200 cm
𝜇
1
0.3
0.7
0.2
0.8
Introduction to Fuzzy
23
0.7 0.3 Medium Heavy
Very
Heavy
Very Short H SH LH U U
Short SH H SH LH U
0.8 LH H H LH U
0.2 U SH H SH U
Very Tall U LH H SH LH
WeightHeight
• Fuzzy Rule Table:
Introduction to Fuzzy
24
0.7 0.3 Medium Heavy
Very
Heavy
Very
Short
H SH LH U U
Short SH H SH LH U
0.8 0.7 0.3 H LH U
0.2 0.2 0.2 H SH U
Very
Tall
U LH H SH LH
Weight
Height
   0.7, 0.3, 0, 0, 0Weight VS S M H VH      
   0, 0, 0.8, 0.2, 0Height VS S M T VT      
Introduction to Fuzzy
• Scaled Fuzzified Decision:
25
   , , , 0.2, 0.7, 0.2, 0.3f U LH SH H 
U
LH
SH H
0.2 0.4 0.6 0.8 1
f
𝟎. 𝟕
𝟎. 𝟑
𝟎. 𝟐
Decision
Introduction to Fuzzy
• Defuzzification Methods:
– Centroid:
– Bisector:
26
0
0
( ) ( )
x
A Ax
x dx x dx


  
0
( )
( )
i A i
A i
x x
x
x


 

Introduction to Fuzzy
– Middle, Smallest, and Largest of Maximum:
27
( )A
x
x
SOM LOMMOM
• Defuzzification Methods:
Introduction to Fuzzy
• Centroid Method:
28
*
l l
l
y w
y
w
 

0.2 0.2 0.7 0.4 0.2 0.6 0.3 0.8
0.4857
0.2 0.7 0.2 0.3
FD
      
 
  
FD= Final Decision
D: Decision
U
LH
SH H
0.2 0.4 0.6 0.8 1
f
𝟎. 𝟕
𝟎. 𝟑
𝟎. 𝟐
Decision
, 1,...,4
l
y l 
lw
Introduction to Fuzzy
• Step 4: Final Decision
• Assume that crisp decision index (D) is centroid:
D=0.4857
29
U LH SH H
0.2 0.4 0.6 0.8 1
f
Decision
1
0.75
0.25
0.4857
25% in SH group and 75% in LH group
Introduction to Fuzzy
• Fuzzy Extension Principle:
– How far is it from Zanjan to Urmia?
30
Tabriz Shahrekord
Zanjan 0.3 0.9
Shahrekord 1 0
Esfahan 0.95 0.1
x
y
Urmia Ahvaz
Tabriz 0.95 0.1
Shahrekord 0.1 0.9
y
z
( , ) ( , ), ( , )POQ y P Qx z S t x y y z     
Scaled Distance Among Cities:
Introduction to Fuzzy
• Assume that t-norm is product, and s-norm is max
31
0.3 0.95
( , ), ( , ) 0.3 0.95 0.285P Qprod Zanjan Tabriz Tabriz Urmia 
 
    
 
 
0.9 0.1
( , ), ( , ) 0.9 0.1 0.09P Qprod Zanjan Shahrekord Shahrekord Urmia 
 
    
 
 
 max 0.285,0.09 0.285
Zanjan is close to Urmia
Introduction to Fuzzy
• TSK Fuzzy System:
32
1 1 0 1 1,..., ...l l l l l l
n n n nIf x is C x is C then y c c x c x   
:l
iC Fuzzy sets
:l
ic Constants
 
l l
l
y w
f x
w
 

1,2,...,l M
 
1
l
i
n
l
iC
i
w x

 Output:
Introduction to Neural Network
33
Input
Weight
Σ f
Neuron
Output
Activation Function
• Neural Network:
Introduction to Neural Network
• Multilayer Perceptron:
34
InputSignal
OutputSignal
Input Layer
First
Hidden
Layer
Second
Hidden
Layer
Output Layer⋮
⋮
⋮⋮
Supervised
Learning
Random
Initialization
Deep NN
Introduction to Neural Network
• MLP:
– Fully connected Overfitting
– Suitable for:
• Classification prediction problems
• Regression prediction problems
• Tabular datasets
– Contain data in a columnar format, each column (field)
must have a name and may only contain data of one type
– Try MLPs on:
• Image data (e.g. the pixels of an image can be reduced down
to one long row of data and fed into an MLP)
• Text data
• Time series data
• Other types of data
35
Supervised
Learning
Introduction to Neural Network
• Feed Forward:
36
InputSignal
Output Signal
Input Layer
First
Hidden
Layer
Second
Hidden
Layer
Output Layer
Te
⋮⋮ ⋮
⋮ ⋮
Introduction to Neural Network
• Back Propagate:
37
InputSignal
Output Signal
Input Layer
First
Hidden
Layer
Second
Hidden
Layer
Output Layer
Te
Training
⋮ ⋮ ⋮
⋮ ⋮
Introduction to Neural Network
38
• Simple Neural Network:
𝑥1
𝑥2
𝑥 𝑛0
𝑁𝑒𝑢𝑟𝑜𝑛1
1
𝑁𝑒𝑢𝑟𝑜𝑛2
1
𝑁𝑒𝑢𝑟𝑜𝑛1
2
1
1
Σ
Σ
Σ
𝑤10
1
𝑤11
2
𝑤10
2
𝑤22
1
𝑤21
1
𝑤20
1
𝑤1𝑛0
1
𝑤11
1
𝑤12
1
𝑤12
2
𝑤2𝑛0
1
f
f
f
𝑜1
2
𝑜2
1
𝑜1
1
𝑛𝑒𝑡1
1
𝑛𝑒𝑡1
2
𝑛𝑒𝑡2
1
…
…
⋮
Introduction to Neural Network
39
= 𝑤10
1
, 𝑤11
1
, 𝑤12
1
, . . . , 𝑤1𝑛0
1 𝑇
= 𝑤20
1
, 𝑤21
1
, 𝑤22
1
, . . . , 𝑤2𝑛0
1 𝑇
= 𝑤10
2
, 𝑤11
2
, 𝑤12
2 𝑇
𝑛𝑒𝑡1
1
=
𝑖=0
𝑛0
𝑤1𝑖
1
𝑥𝑖
𝑛𝑒𝑡2
1
=
𝑖=0
𝑛0
𝑤2𝑖
1
𝑥𝑖
𝑜1
1
= 𝑓(𝑛𝑒𝑡1
1
𝑜2
1
= 𝑓(𝑛𝑒𝑡2
1
𝑛𝑒𝑡1
2
=
𝑖=0
2
𝑤1𝑖
2
𝑜𝑖
1
𝑜1
2
= 𝑓(𝑛𝑒𝑡1
2
= 𝑜0
1
, 𝑜1
1
, 𝑜2
1 𝑇
𝑜0
1
= 1, 𝑥0 = 1
𝑤1
1
𝑤2
1
𝑤1
2
𝑜1
𝑥 = 𝑥0, 𝑥1, 𝑥2, . . . , 𝑥 𝑛0
𝑇
= 𝑤1
1 𝑇. 𝑥
= 𝑤2
1 𝑇. 𝑥
= 𝑤1
2 𝑇
. 𝑜1
Feed Forward
Introduction to Neural Network
40
𝑥1
𝑥2
𝑥 𝑛0
𝑁𝑒𝑢𝑟𝑜𝑛1
1
𝑁𝑒𝑢𝑟𝑜𝑛2
1
𝑁𝑒𝑢𝑟𝑜𝑛1
2
1
1
Σ
Σ
Σ
𝑤10
1
𝒘 𝟏𝟏
𝟐
𝒘 𝟏𝟎
𝟐
𝑤22
1
𝑤21
1
𝑤20
1
𝑤1𝑛0
1
𝑤11
1
𝑤12
1
𝒘 𝟏𝟐
𝟐
𝑤2𝑛0
1
f
f
f
𝒐 𝟏
𝟐
𝑜2
1
𝑜1
1
𝑛𝑒𝑡1
1
𝒏𝒆𝒕 𝟏
𝟐
𝑛𝑒𝑡2
1
…
…
T
e
Back Propagate
'2 1
2 2
1 1
2 2 2 2
1 1 1 1
1e
f o
E E e o net
w e o net w
 
    
   
     
⋮
Introduction to Neural Network
41
𝑥1
𝑥2
𝑥 𝑛0
𝑁𝑒𝑢𝑟𝑜𝑛1
1
𝑁𝑒𝑢𝑟𝑜𝑛2
1
𝑁𝑒𝑢𝑟𝑜𝑛1
2
1
1
Σ
Σ
Σ
𝑤10
1
𝒘 𝟏𝟏
𝟐
𝒘 𝟏𝟎
𝟐
𝑤22
1
𝑤21
1
𝑤20
1
𝑤1𝑛0
1
𝑤11
1
𝑤12
1
𝒘 𝟏𝟐
𝟐
𝑤2𝑛0
1
f
f
f
𝒐 𝟏
𝟐
𝑜2
1
𝑜1
1
𝑛𝑒𝑡1
1
𝒏𝒆𝒕 𝟏
𝟐
𝑛𝑒𝑡2
1
…
…
T
e
Back Propagate
'2 2 '1
11
2 2 1 1
1 1 1 1
1 2 2 1 1 1
1 1 1 1 1 1
1e xf w f
E E e o net o net
w e o net o net w
 
      
     
       
⋮
Introduction to Neural Network
42
  21
2
i
i
E k e 
   
 
 
1
E k
w k w k
w k


  

Gradient Descent
Exercise: Rewrite the back-propagation equations for a
neural network with 2 outputs.
Introduction to Neural Network
• Popular Activation Functions:
– Sigmoid (Logistic):
• Sigmoids saturate and tend to vanish gradient
• Exp() is a bit compute expensive
• Sigmoid outputs are not zero-centered
43
 
1
1 x
x
e
 


   0,1x 
Introduction to Neural Network
– Tanh:
• Zero centered
• Tanh saturate and tend to vanish gradient
• Tanh() is a bit compute expensive
44
 
2
2
1
1
x
x
e
f x
e





   1,1f x  
Introduction to Neural Network
– ReLU:
• Rectified Linear Unit
• Does not saturate (in range +)
• Very computationally efficient
• Converges faster than sigmoid/tanh
• Not zero-centered output
• Saturate (in range -)
45
   max 0,f x x
   0,f x  
Introduction to Neural Network
– LReLU and PReLU:
• Does not saturate
• Computationally efficient
• Converges much faster
• Zero-centered output
46
   max 0.01 ,f x x x
   max ,f x x x
LReLU:
PReLU:
Introduction to Neural Network
– ELU:
• Exponential Linear Unit
• Zero-centered output
• Closer to zero mean output
• Robustness to noise compared with LReLU
47
 
  
0
exp 1 0
x x
f x
x x

 
 
Introduction to Neural Network
• Properties of Activation Functions:
– Nonlinear
– Continuously differentiable
– Range
– Monotonic
– Smooth
• Bipolar and Unipolar:
– Unipolar Sigmoid
– Bipolar Sigmoid
48
f(net)=
𝟏
𝟏+𝒆−𝒈.𝒏𝒆𝒕
f(net)=
𝟏−𝒆−𝒈.𝒏𝒆𝒕
𝟏+𝒆−𝒈.𝒏𝒆𝒕
Introduction to Neural Network
• Flexible Neural Network:
49
        .
1
,
1
s
j
s
j
s
j g k
s s
j j net k
f gnet k k
e



   
 
 
1s s s
g s
E k
g k g k
g k


  

    
   
   
.
.
1
,
1
s
j
s
j
s
j
s
j
g k
s
j g k
net k
s s
j j net k
e
f n g ket k
e





Unipolar Sigmoid:
Bipolar Sigmoid:
Training:
Introduction to Neural Network
50
𝑥1
𝑥2
𝑥 𝑛0
𝑁𝑒𝑢𝑟𝑜𝑛1
1
𝑁𝑒𝑢𝑟𝑜𝑛2
1
𝑁𝑒𝑢𝑟𝑜𝑛1
2
1
1
Σ
Σ
Σ
𝑤10
1
𝒘 𝟏𝟏
𝟐
𝒘 𝟏𝟎
𝟐
𝑤22
1
𝑤21
1
𝑤20
1
𝑤1𝑛0
1
𝑤11
1
𝑤12
1
𝒘 𝟏𝟐
𝟐
𝑤2𝑛0
1
f
f
f
𝒐 𝟏
𝟐
𝑜2
1
𝑜1
1
𝑛𝑒𝑡1
1
𝑛𝑒𝑡1
2
𝑛𝑒𝑡2
1
…
…
T
e
Back Propagate
*2
2
1
2 2 2
1
1e
f
E E e o
g e o g

   
  
   
⋮
Introduction to Neural Network
51
Unipolar Sigmoid:
Bipolar Sigmoid:
Training:
    
 
   .
2
,
1
ss
j j
s
js
j a k
s s
j j net k
f
a
net k
k
a k
e



      
   
   
.
.
1 1
,
1
s
j
s
j j
s
j
s
n
kn
a k
s
et k
s s
j j s et k
j
j a
e
f net k
a k e
a k



 

   
 
 
1s s s
a s
E k
a k a k
a k


  

• Flexible Neural Network:
  1s
jg k 
Introduction to Neural Network
52
𝑥1
𝑥2
𝑥 𝑛0
𝑁𝑒𝑢𝑟𝑜𝑛1
1
𝑁𝑒𝑢𝑟𝑜𝑛2
1
𝑁𝑒𝑢𝑟𝑜𝑛1
2
1
1
Σ
Σ
Σ
𝑤10
1
𝒘 𝟏𝟏
𝟐
𝒘 𝟏𝟎
𝟐
𝑤22
1
𝑤21
1
𝑤20
1
𝑤1𝑛0
1
𝑤11
1
𝑤12
1
𝒘 𝟏𝟐
𝟐
𝑤2𝑛0
1
f
f
f
𝒐 𝟏
𝟐
𝑜2
1
𝑜1
1
𝑛𝑒𝑡1
1
𝒏𝒆𝒕 𝟏
𝟐
𝑛𝑒𝑡2
1
…
…
T
e
Back Propagate
*1
'2 2
11
2 2 1
1 1 1
1 2 2 1 1
1 1 1
1e ff w
E E e o net o
a e o net o a

     
    
     
⋮
Introduction to Neural Network
• Radial Basis Function (RBF):
– Similarity between input signal and prototype
53
⋮
𝑥1
𝑥n
𝑥2
𝑤 y
⋮
Gaussian Activation Function
⋮ ⋮
Introduction to Neural Network
54
Σ
Σ
Σ
.
.
.
Neuron 1
Neuron m
Neuron j⋮
⋮
Σ y
𝑤1
𝑤 𝑚
𝑤𝑗
𝑛𝑒𝑡1
𝑛𝑒𝑡𝑗
𝑛𝑒𝑡 𝑚
𝑜1
1
𝑜 𝑚
1
𝑜𝑗
1
𝜙1 .
𝜙 𝑚 .
𝜙𝑗 .
−𝑐1
−𝑐𝑗
−𝑐 𝑚
𝑥
• RBF:
⋮
Introduction to Neural Network
55
𝑛𝑒𝑡𝑗 = ‖𝑥 − 𝑐𝑗‖ = 𝑥1 − 𝑐1𝑗
2
+ 𝑥2 − 𝑐2𝑗
2
+. . . + 𝑥 𝑛 − 𝑐 𝑛𝑗
2
𝑜𝑗
1
= 𝜙 𝑛𝑒𝑡𝑗
𝜙 𝑛𝑒𝑡𝑗 = 𝑒
−1
2
𝑛𝑒𝑡 𝑗
𝜎 𝑗
2
𝑥 = 𝑥1, 𝑥2, . . . , 𝑥 𝑛
𝑐𝑗 = 𝑐1𝑗, 𝑐2𝑗, . . . , 𝑐 𝑛𝑗
𝜎 = 𝜎1, 𝜎2, . . . , 𝜎 𝑚
′
𝑤 = 𝑤1, 𝑤2, . . . , 𝑤 𝑚
′
𝑜1 = 𝑜1
1
, 𝑜2
1
, . . . , 𝑜 𝑚
1 ′
Introduction to Neural Network
• Training of RBF Networks:
–
–
56
𝑐𝑗 𝑘 + 1 = 𝑐𝑗 𝑘 − 𝜂
𝜕𝐸
𝜕𝑐𝑗
𝑘  
      
  
 
 
1
22
1
1
1
j j
j
j
j
j j j
e
w k x k c k
o k
k
oE E e y
k k
c e y o c




   
   
    
𝜎𝑗 𝑘 + 1 = 𝜎𝑗 𝑘 − 𝜂
𝜕𝐸
𝜕𝜎𝑗
𝑘  
   
  
 
 
2
1
3
1
1
1
j
j
j
j
j j j
e
w k net
o k
k
oE E e y
k k
e y o

 


   
   
    
𝒄𝒋 :
𝝈𝒋 :
Introduction to Neural Network
• Recurrent Neural Network (RNN):
57
y(k+1)
x(k)
x(k-1)
x(k-2)
𝑧−1
𝑧−1
𝑧−1
𝑧−1
𝑧−1
b
y(k-2)
y(k-1)
y(k)
Introduction to Neural Network
• Feedback Types in Recurrent Neural Network:
– Local (A)
– Inter-layer (B)
– Global (C)
58
X(k) y(k)
A
B
C
𝑤𝑥X(k) y(k)
𝑤 𝑟,1
𝑤 𝑟,2
𝑤 𝑟,𝑛1
Introduction to Neural Network
• Local feedback activation:
59
Feed Forward
     
1
x r
i
net k w x k w net k i

     
Introduction to Neural Network
• Local output feedback:
60
𝑤𝑥X(k) y(k)
𝑤 𝑟,1
𝑤 𝑟,2
𝑤 𝑟,𝑛1
Feed Forward
     
0 1
x r
j i
net k w x k j w y k i
 
     
    y k f net k
Introduction to Neural Network
• The Vanishing Gradient Problem:
– Causes small gradients
– Prevents the weights from updating
61
0.29
0.28999
InputSignal
OutputSignal
Introduction to Neural Network
• The Exploding Gradient Problem:
– Causes large gradients
– The weights get away from their optimum value
62
0.29
1.872351
InputSignal
OutputSignal
Introduction to Neural Network
63
⋮
• Elman Neural Network:
⋮
⋮⋮
𝑥1
𝑥2
𝑥 𝑛0
𝑥 𝑐1
𝑥 𝑐𝑛1
𝑥 𝑐2
𝑓1
𝑓1
𝑓1
𝑓2
𝑓2
𝑓2
cw
xw yw
𝑜1
1
𝑜 𝑛1
1
⋮
𝑒1
𝑒 𝑛2
𝑒2
Hidden Layer 1
𝑇1
𝑇2
𝑇𝑛2
⋮
⋮
𝑛1 𝑛2
Introduction to Neural Network
• Elman Neural Network:
64
Feed Forward
    
        
1 1 1
1 1
1 1
1 1 1 1x c
o k f net k
f w k x k w k o k
   
       
 1
1cx o k  
       2 2 2 2 1
yo K f net k f w o k   
Introduction to Neural Network
• Elman Neural Network:
65
Back Propagate
   
2
2
1
1
2
n
j
j
E k e k

 
'2
1
2 2
2 2
1
y y
e f
o
E E e o net
w e o net w


    
   
      
   
 
 
1y y
y
E k
w k w k
w k


  

In the same way for 𝑤 𝑥
Introduction to Neural Network
• Jordan Neural Network:
66
⋮⋮
𝑥1
𝑥2
𝑥 𝑛0
𝑥 𝑐1
𝑥 𝑐𝑛2
𝑥 𝑐2
𝑓1
𝑓1
𝑓1
𝑓2
𝑓2
𝑓2
cw
xw yw
𝑜1
1
𝑜 𝑛2
1
𝑦 𝑛2
𝑦2
𝑦1
⋮
⋮
⋮
𝑛1
𝑛2
Output Layer

More Related Content

Similar to An Introduction to Fuzzy Sets and Neural Networks

Fuzzy logicintro by
Fuzzy logicintro by Fuzzy logicintro by
Fuzzy logicintro by Waseem Abbas
 
Deep learning study 2
Deep learning study 2Deep learning study 2
Deep learning study 2San Kim
 
Neural Networks. Overview
Neural Networks. OverviewNeural Networks. Overview
Neural Networks. OverviewOleksandr Baiev
 
9023a85169c3a624b9493f6e992848fcb8932f42340efcdf865b15380ad94688_Lecture-27_E...
9023a85169c3a624b9493f6e992848fcb8932f42340efcdf865b15380ad94688_Lecture-27_E...9023a85169c3a624b9493f6e992848fcb8932f42340efcdf865b15380ad94688_Lecture-27_E...
9023a85169c3a624b9493f6e992848fcb8932f42340efcdf865b15380ad94688_Lecture-27_E...GAURAVKUMAR37337
 
Clara_de_Paiva_Master_thesis_presentation_June2016
Clara_de_Paiva_Master_thesis_presentation_June2016Clara_de_Paiva_Master_thesis_presentation_June2016
Clara_de_Paiva_Master_thesis_presentation_June2016Clara de Paiva
 
Optimization Techniques.pdf
Optimization Techniques.pdfOptimization Techniques.pdf
Optimization Techniques.pdfanandsimple
 
Recursive State Estimation AI for Robotics.pdf
Recursive State Estimation AI for Robotics.pdfRecursive State Estimation AI for Robotics.pdf
Recursive State Estimation AI for Robotics.pdff20220630
 
Bounded arithmetic in free logic
Bounded arithmetic in free logicBounded arithmetic in free logic
Bounded arithmetic in free logicYamagata Yoriyuki
 
An Introduction to Quantum Programming Languages
An Introduction to Quantum Programming LanguagesAn Introduction to Quantum Programming Languages
An Introduction to Quantum Programming LanguagesDavid Yonge-Mallo
 
Max flows via electrical flows (long talk)
Max flows via electrical flows (long talk)Max flows via electrical flows (long talk)
Max flows via electrical flows (long talk)Thatchaphol Saranurak
 
Sparsenet
SparsenetSparsenet
Sparsenetndronen
 
Computational Motor Control: Optimal Control for Deterministic Systems (JAIST...
Computational Motor Control: Optimal Control for Deterministic Systems (JAIST...Computational Motor Control: Optimal Control for Deterministic Systems (JAIST...
Computational Motor Control: Optimal Control for Deterministic Systems (JAIST...hirokazutanaka
 
santosh kumar fuzzy logic presentation
santosh kumar   fuzzy logic presentationsantosh kumar   fuzzy logic presentation
santosh kumar fuzzy logic presentationAkash Maurya
 
SPIE Conference V3.0
SPIE Conference V3.0SPIE Conference V3.0
SPIE Conference V3.0Robert Fry
 
Frequency Response with MATLAB Examples.pdf
Frequency Response with MATLAB Examples.pdfFrequency Response with MATLAB Examples.pdf
Frequency Response with MATLAB Examples.pdfSunil Manjani
 

Similar to An Introduction to Fuzzy Sets and Neural Networks (20)

Fuzzy logicintro by
Fuzzy logicintro by Fuzzy logicintro by
Fuzzy logicintro by
 
Deep learning study 2
Deep learning study 2Deep learning study 2
Deep learning study 2
 
Fuzzy and nn
Fuzzy and nnFuzzy and nn
Fuzzy and nn
 
Neural Networks. Overview
Neural Networks. OverviewNeural Networks. Overview
Neural Networks. Overview
 
9023a85169c3a624b9493f6e992848fcb8932f42340efcdf865b15380ad94688_Lecture-27_E...
9023a85169c3a624b9493f6e992848fcb8932f42340efcdf865b15380ad94688_Lecture-27_E...9023a85169c3a624b9493f6e992848fcb8932f42340efcdf865b15380ad94688_Lecture-27_E...
9023a85169c3a624b9493f6e992848fcb8932f42340efcdf865b15380ad94688_Lecture-27_E...
 
Clara_de_Paiva_Master_thesis_presentation_June2016
Clara_de_Paiva_Master_thesis_presentation_June2016Clara_de_Paiva_Master_thesis_presentation_June2016
Clara_de_Paiva_Master_thesis_presentation_June2016
 
02-gates-w.pptx
02-gates-w.pptx02-gates-w.pptx
02-gates-w.pptx
 
Optimization Techniques.pdf
Optimization Techniques.pdfOptimization Techniques.pdf
Optimization Techniques.pdf
 
ERF Training Workshop Panel Data 5
ERF Training WorkshopPanel Data 5ERF Training WorkshopPanel Data 5
ERF Training Workshop Panel Data 5
 
Neural Networks
Neural NetworksNeural Networks
Neural Networks
 
Recursive State Estimation AI for Robotics.pdf
Recursive State Estimation AI for Robotics.pdfRecursive State Estimation AI for Robotics.pdf
Recursive State Estimation AI for Robotics.pdf
 
Deconvolution
DeconvolutionDeconvolution
Deconvolution
 
Bounded arithmetic in free logic
Bounded arithmetic in free logicBounded arithmetic in free logic
Bounded arithmetic in free logic
 
An Introduction to Quantum Programming Languages
An Introduction to Quantum Programming LanguagesAn Introduction to Quantum Programming Languages
An Introduction to Quantum Programming Languages
 
Max flows via electrical flows (long talk)
Max flows via electrical flows (long talk)Max flows via electrical flows (long talk)
Max flows via electrical flows (long talk)
 
Sparsenet
SparsenetSparsenet
Sparsenet
 
Computational Motor Control: Optimal Control for Deterministic Systems (JAIST...
Computational Motor Control: Optimal Control for Deterministic Systems (JAIST...Computational Motor Control: Optimal Control for Deterministic Systems (JAIST...
Computational Motor Control: Optimal Control for Deterministic Systems (JAIST...
 
santosh kumar fuzzy logic presentation
santosh kumar   fuzzy logic presentationsantosh kumar   fuzzy logic presentation
santosh kumar fuzzy logic presentation
 
SPIE Conference V3.0
SPIE Conference V3.0SPIE Conference V3.0
SPIE Conference V3.0
 
Frequency Response with MATLAB Examples.pdf
Frequency Response with MATLAB Examples.pdfFrequency Response with MATLAB Examples.pdf
Frequency Response with MATLAB Examples.pdf
 

Recently uploaded

Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
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
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSrknatarajan
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 

Recently uploaded (20)

Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
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...
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 

An Introduction to Fuzzy Sets and Neural Networks

  • 1. An Introduction to Deep Learning Mehrnaz Faraz Faculty of Electrical Engineering K. N. Toosi University of Technology 1 In the name of God Milad Abbasi Faculty of Electrical Engineering Sharif University of Technology
  • 2. Contents • Introduction to Fuzzy • Introduction to Neural Network 2
  • 3. Introduction to Fuzzy • Fuzzy: “Difficult to perceive; indistinct or vague” – Simplicity and flexibility – Can handle problems with imprecise data – More readily customizable in natural language terms 3
  • 4. Introduction to Fuzzy 4 Slowest, 𝐴1 Slow, 𝐴2 Fast, 𝐴3 Fastest, 𝐴4 Subset 0 1 Velocity 𝜇 𝐴 Membership Function 𝜇 𝐴 𝑖 𝑥 : 𝑥 → 0, 1 , i = 1, … , 4 Slowest FastestSlow Fast
  • 5. Introduction to Fuzzy • Example: Automatic Braking System 5 Close?  Is car close? 0.2 (Not very close) Brakes: 0.2 (Slight pressure)  Is car close? 0.8 (Pretty close) Brakes: 0.8 (Fairly heavy pressure)
  • 6. Introduction to Fuzzy 6 • Well-known Membership Functions: trimf trapmf gaussmf sigmf a b c a b c d sig c
  • 7. Introduction to Fuzzy 7 • Linguistic variables: • Weather is quite cold. • Height is almost tall. • Speed is very high. • Weather, Height and Speed are linguistic variables. • Cold, Tall and high are linguistic value.
  • 8. Introduction to Fuzzy • Operations with fuzzy sets: – Complement operation: – Fuzzy union operation or fuzzy OR: – Fuzzy intersection operation or fuzzy AND: 8 )(1)( xx AA   A( ) s[ ( ), ( )]A B Bx x x    A( ) t [ ( ), ( )]A B Bx x x   
  • 9. 1 1 2 30 4 1 1 2 30 4 1 2 30 4 1 ( )A x ( )B x ( )A B x  Introduction to Fuzzy • Fuzzy union operation (s-norm): 9 Max is a s-norm operator x x x
  • 10. 1 1 2 30 4 1 1 2 30 4 1 2 30 4 1 ( )A x ( )B x , ( )A B x Introduction to Fuzzy 10 • Fuzzy intersection operation (t-norm): Min is a t-norm operator Product is another t-norm operator (Mamdani Implication) x x x
  • 11. Introduction to Fuzzy • Other complement operations: – Sugeno Class: – Yager Class: 11   1 1 a c a a          1 1 w w wc a a   Aa x Where:
  • 12. Introduction to Fuzzy • Other union operation: – Yager class: – Drastic sum: – Algebraic sum: 12     1 , min 1, w w w ws a b a b         0,w    , 0 , , 0 1 . . ds a b s a b b a o w        ,ass a b a b ab    Aa x  Bb xWhere:
  • 13. Introduction to Fuzzy • Other intersection operation: – Yager class: – Drastic product: – Algebraic product: 13        1 , 1 min 1, 1 1 w w w wt a b a b              , 1 , , 1 0 . . dp a b t a b b a o w        ,apt a b ab
  • 14. Introduction to Fuzzy • Example: Assume that we want to evaluate the health of a person based on his height and weight. • The input variables are the crisp numbers of the person’s height and weight. • Output is percentage of healthiness. 14 Input Output Fazzifier Defazzifier Rule Base Data Base Inference Engine Crisp Number Crisp Number
  • 15. Introduction to Fuzzy • Step 1: Fuzzification 15 SlimVery Slim Medium Heavy Very Heavy 50 Kg 75 Kg 100 Kg 125 Kg Weight 𝜇 1 Very Short Short Medium Tall Very Tall Height 140 cm 160 cm 180 cm 200 cm 𝜇 1 Input Membership Functions:
  • 16. Introduction to Fuzzy • Step 2: Rules • Rules reflect experts decisions • Rules can be redundant • Rules can be adjusted to match desired • Rules are tabulated as fuzzy words • If x is A then y is B • if 𝑥1is 𝐴1 and/or 𝑥2 is 𝐴2 … and/or 𝑥 𝑛 is 𝐴 𝑛 then y is B 16
  • 17. Introduction to Fuzzy • Implications: – Mamdani implication: 17 1 2 1 2 FP FP IF FP THEN FP            1 2 , min ,QMM FP FPx y x y           1 2 , ,QMP FP FPx y prod x y     
  • 18. Introduction to Fuzzy – Godel implication: – Zadeh implication: 18       1 2 2 1 , . . FP FP QG FP x y y o w                  1 2 1 , max min , , 1QZ FP FP FPx y x y x      
  • 19. Introduction to Fuzzy • Inference Rules: – Modus Ponens: – Modus Tollens: – Hypothetical Syllogism: 19 X is A Y is B If X is A then Y is B    Y is not B X is not A If X is A then Y is B    If X is A then Y is B If X is A then Z is C If Y is B then Z is C   
  • 20. Introduction to Fuzzy • Rules are tabulated as fuzzy words – Healthy (H) – Somewhat healthy (SH) – Less Healthy (LH) – Unhealthy (U) – Rule function f = {U, LH, SH, H} 20 U LH SH H 0.2 0.4 0.6 0.8 1 f 1 Decision Output Membership Function:
  • 21. Introduction to Fuzzy 21 Very Slim slim Medium Heavy Very Heavy Very Short H SH LH U U Short SH H SH LH U Medium LH H H LH U Tall U SH H SH U Very Tall U LH H SH LH WeightHeight • Fuzzy Rule Table:
  • 22. Introduction to Fuzzy • Step 3: Calculation • Assume that height = 187 cm and weight = 49 kg 22 SlimVery Slim Medium Heavy Very Heavy 50 Kg 75 Kg 100 Kg 125 Kg Weight 𝜇 1 Very Short Short Medium Tall Very Tall Height 140 cm 160 cm 180 cm 200 cm 𝜇 1 0.3 0.7 0.2 0.8
  • 23. Introduction to Fuzzy 23 0.7 0.3 Medium Heavy Very Heavy Very Short H SH LH U U Short SH H SH LH U 0.8 LH H H LH U 0.2 U SH H SH U Very Tall U LH H SH LH WeightHeight • Fuzzy Rule Table:
  • 24. Introduction to Fuzzy 24 0.7 0.3 Medium Heavy Very Heavy Very Short H SH LH U U Short SH H SH LH U 0.8 0.7 0.3 H LH U 0.2 0.2 0.2 H SH U Very Tall U LH H SH LH Weight Height    0.7, 0.3, 0, 0, 0Weight VS S M H VH          0, 0, 0.8, 0.2, 0Height VS S M T VT      
  • 25. Introduction to Fuzzy • Scaled Fuzzified Decision: 25    , , , 0.2, 0.7, 0.2, 0.3f U LH SH H  U LH SH H 0.2 0.4 0.6 0.8 1 f 𝟎. 𝟕 𝟎. 𝟑 𝟎. 𝟐 Decision
  • 26. Introduction to Fuzzy • Defuzzification Methods: – Centroid: – Bisector: 26 0 0 ( ) ( ) x A Ax x dx x dx      0 ( ) ( ) i A i A i x x x x     
  • 27. Introduction to Fuzzy – Middle, Smallest, and Largest of Maximum: 27 ( )A x x SOM LOMMOM • Defuzzification Methods:
  • 28. Introduction to Fuzzy • Centroid Method: 28 * l l l y w y w    0.2 0.2 0.7 0.4 0.2 0.6 0.3 0.8 0.4857 0.2 0.7 0.2 0.3 FD             FD= Final Decision D: Decision U LH SH H 0.2 0.4 0.6 0.8 1 f 𝟎. 𝟕 𝟎. 𝟑 𝟎. 𝟐 Decision , 1,...,4 l y l  lw
  • 29. Introduction to Fuzzy • Step 4: Final Decision • Assume that crisp decision index (D) is centroid: D=0.4857 29 U LH SH H 0.2 0.4 0.6 0.8 1 f Decision 1 0.75 0.25 0.4857 25% in SH group and 75% in LH group
  • 30. Introduction to Fuzzy • Fuzzy Extension Principle: – How far is it from Zanjan to Urmia? 30 Tabriz Shahrekord Zanjan 0.3 0.9 Shahrekord 1 0 Esfahan 0.95 0.1 x y Urmia Ahvaz Tabriz 0.95 0.1 Shahrekord 0.1 0.9 y z ( , ) ( , ), ( , )POQ y P Qx z S t x y y z      Scaled Distance Among Cities:
  • 31. Introduction to Fuzzy • Assume that t-norm is product, and s-norm is max 31 0.3 0.95 ( , ), ( , ) 0.3 0.95 0.285P Qprod Zanjan Tabriz Tabriz Urmia             0.9 0.1 ( , ), ( , ) 0.9 0.1 0.09P Qprod Zanjan Shahrekord Shahrekord Urmia              max 0.285,0.09 0.285 Zanjan is close to Urmia
  • 32. Introduction to Fuzzy • TSK Fuzzy System: 32 1 1 0 1 1,..., ...l l l l l l n n n nIf x is C x is C then y c c x c x    :l iC Fuzzy sets :l ic Constants   l l l y w f x w    1,2,...,l M   1 l i n l iC i w x   Output:
  • 33. Introduction to Neural Network 33 Input Weight Σ f Neuron Output Activation Function • Neural Network:
  • 34. Introduction to Neural Network • Multilayer Perceptron: 34 InputSignal OutputSignal Input Layer First Hidden Layer Second Hidden Layer Output Layer⋮ ⋮ ⋮⋮ Supervised Learning Random Initialization Deep NN
  • 35. Introduction to Neural Network • MLP: – Fully connected Overfitting – Suitable for: • Classification prediction problems • Regression prediction problems • Tabular datasets – Contain data in a columnar format, each column (field) must have a name and may only contain data of one type – Try MLPs on: • Image data (e.g. the pixels of an image can be reduced down to one long row of data and fed into an MLP) • Text data • Time series data • Other types of data 35 Supervised Learning
  • 36. Introduction to Neural Network • Feed Forward: 36 InputSignal Output Signal Input Layer First Hidden Layer Second Hidden Layer Output Layer Te ⋮⋮ ⋮ ⋮ ⋮
  • 37. Introduction to Neural Network • Back Propagate: 37 InputSignal Output Signal Input Layer First Hidden Layer Second Hidden Layer Output Layer Te Training ⋮ ⋮ ⋮ ⋮ ⋮
  • 38. Introduction to Neural Network 38 • Simple Neural Network: 𝑥1 𝑥2 𝑥 𝑛0 𝑁𝑒𝑢𝑟𝑜𝑛1 1 𝑁𝑒𝑢𝑟𝑜𝑛2 1 𝑁𝑒𝑢𝑟𝑜𝑛1 2 1 1 Σ Σ Σ 𝑤10 1 𝑤11 2 𝑤10 2 𝑤22 1 𝑤21 1 𝑤20 1 𝑤1𝑛0 1 𝑤11 1 𝑤12 1 𝑤12 2 𝑤2𝑛0 1 f f f 𝑜1 2 𝑜2 1 𝑜1 1 𝑛𝑒𝑡1 1 𝑛𝑒𝑡1 2 𝑛𝑒𝑡2 1 … … ⋮
  • 39. Introduction to Neural Network 39 = 𝑤10 1 , 𝑤11 1 , 𝑤12 1 , . . . , 𝑤1𝑛0 1 𝑇 = 𝑤20 1 , 𝑤21 1 , 𝑤22 1 , . . . , 𝑤2𝑛0 1 𝑇 = 𝑤10 2 , 𝑤11 2 , 𝑤12 2 𝑇 𝑛𝑒𝑡1 1 = 𝑖=0 𝑛0 𝑤1𝑖 1 𝑥𝑖 𝑛𝑒𝑡2 1 = 𝑖=0 𝑛0 𝑤2𝑖 1 𝑥𝑖 𝑜1 1 = 𝑓(𝑛𝑒𝑡1 1 𝑜2 1 = 𝑓(𝑛𝑒𝑡2 1 𝑛𝑒𝑡1 2 = 𝑖=0 2 𝑤1𝑖 2 𝑜𝑖 1 𝑜1 2 = 𝑓(𝑛𝑒𝑡1 2 = 𝑜0 1 , 𝑜1 1 , 𝑜2 1 𝑇 𝑜0 1 = 1, 𝑥0 = 1 𝑤1 1 𝑤2 1 𝑤1 2 𝑜1 𝑥 = 𝑥0, 𝑥1, 𝑥2, . . . , 𝑥 𝑛0 𝑇 = 𝑤1 1 𝑇. 𝑥 = 𝑤2 1 𝑇. 𝑥 = 𝑤1 2 𝑇 . 𝑜1 Feed Forward
  • 40. Introduction to Neural Network 40 𝑥1 𝑥2 𝑥 𝑛0 𝑁𝑒𝑢𝑟𝑜𝑛1 1 𝑁𝑒𝑢𝑟𝑜𝑛2 1 𝑁𝑒𝑢𝑟𝑜𝑛1 2 1 1 Σ Σ Σ 𝑤10 1 𝒘 𝟏𝟏 𝟐 𝒘 𝟏𝟎 𝟐 𝑤22 1 𝑤21 1 𝑤20 1 𝑤1𝑛0 1 𝑤11 1 𝑤12 1 𝒘 𝟏𝟐 𝟐 𝑤2𝑛0 1 f f f 𝒐 𝟏 𝟐 𝑜2 1 𝑜1 1 𝑛𝑒𝑡1 1 𝒏𝒆𝒕 𝟏 𝟐 𝑛𝑒𝑡2 1 … … T e Back Propagate '2 1 2 2 1 1 2 2 2 2 1 1 1 1 1e f o E E e o net w e o net w                  ⋮
  • 41. Introduction to Neural Network 41 𝑥1 𝑥2 𝑥 𝑛0 𝑁𝑒𝑢𝑟𝑜𝑛1 1 𝑁𝑒𝑢𝑟𝑜𝑛2 1 𝑁𝑒𝑢𝑟𝑜𝑛1 2 1 1 Σ Σ Σ 𝑤10 1 𝒘 𝟏𝟏 𝟐 𝒘 𝟏𝟎 𝟐 𝑤22 1 𝑤21 1 𝑤20 1 𝑤1𝑛0 1 𝑤11 1 𝑤12 1 𝒘 𝟏𝟐 𝟐 𝑤2𝑛0 1 f f f 𝒐 𝟏 𝟐 𝑜2 1 𝑜1 1 𝑛𝑒𝑡1 1 𝒏𝒆𝒕 𝟏 𝟐 𝑛𝑒𝑡2 1 … … T e Back Propagate '2 2 '1 11 2 2 1 1 1 1 1 1 1 2 2 1 1 1 1 1 1 1 1 1 1e xf w f E E e o net o net w e o net o net w                        ⋮
  • 42. Introduction to Neural Network 42   21 2 i i E k e          1 E k w k w k w k       Gradient Descent Exercise: Rewrite the back-propagation equations for a neural network with 2 outputs.
  • 43. Introduction to Neural Network • Popular Activation Functions: – Sigmoid (Logistic): • Sigmoids saturate and tend to vanish gradient • Exp() is a bit compute expensive • Sigmoid outputs are not zero-centered 43   1 1 x x e        0,1x 
  • 44. Introduction to Neural Network – Tanh: • Zero centered • Tanh saturate and tend to vanish gradient • Tanh() is a bit compute expensive 44   2 2 1 1 x x e f x e         1,1f x  
  • 45. Introduction to Neural Network – ReLU: • Rectified Linear Unit • Does not saturate (in range +) • Very computationally efficient • Converges faster than sigmoid/tanh • Not zero-centered output • Saturate (in range -) 45    max 0,f x x    0,f x  
  • 46. Introduction to Neural Network – LReLU and PReLU: • Does not saturate • Computationally efficient • Converges much faster • Zero-centered output 46    max 0.01 ,f x x x    max ,f x x x LReLU: PReLU:
  • 47. Introduction to Neural Network – ELU: • Exponential Linear Unit • Zero-centered output • Closer to zero mean output • Robustness to noise compared with LReLU 47      0 exp 1 0 x x f x x x     
  • 48. Introduction to Neural Network • Properties of Activation Functions: – Nonlinear – Continuously differentiable – Range – Monotonic – Smooth • Bipolar and Unipolar: – Unipolar Sigmoid – Bipolar Sigmoid 48 f(net)= 𝟏 𝟏+𝒆−𝒈.𝒏𝒆𝒕 f(net)= 𝟏−𝒆−𝒈.𝒏𝒆𝒕 𝟏+𝒆−𝒈.𝒏𝒆𝒕
  • 49. Introduction to Neural Network • Flexible Neural Network: 49         . 1 , 1 s j s j s j g k s s j j net k f gnet k k e            1s s s g s E k g k g k g k                    . . 1 , 1 s j s j s j s j g k s j g k net k s s j j net k e f n g ket k e      Unipolar Sigmoid: Bipolar Sigmoid: Training:
  • 50. Introduction to Neural Network 50 𝑥1 𝑥2 𝑥 𝑛0 𝑁𝑒𝑢𝑟𝑜𝑛1 1 𝑁𝑒𝑢𝑟𝑜𝑛2 1 𝑁𝑒𝑢𝑟𝑜𝑛1 2 1 1 Σ Σ Σ 𝑤10 1 𝒘 𝟏𝟏 𝟐 𝒘 𝟏𝟎 𝟐 𝑤22 1 𝑤21 1 𝑤20 1 𝑤1𝑛0 1 𝑤11 1 𝑤12 1 𝒘 𝟏𝟐 𝟐 𝑤2𝑛0 1 f f f 𝒐 𝟏 𝟐 𝑜2 1 𝑜1 1 𝑛𝑒𝑡1 1 𝑛𝑒𝑡1 2 𝑛𝑒𝑡2 1 … … T e Back Propagate *2 2 1 2 2 2 1 1e f E E e o g e o g             ⋮
  • 51. Introduction to Neural Network 51 Unipolar Sigmoid: Bipolar Sigmoid: Training:           . 2 , 1 ss j j s js j a k s s j j net k f a net k k a k e                   . . 1 1 , 1 s j s j j s j s n kn a k s et k s s j j s et k j j a e f net k a k e a k               1s s s a s E k a k a k a k       • Flexible Neural Network:   1s jg k 
  • 52. Introduction to Neural Network 52 𝑥1 𝑥2 𝑥 𝑛0 𝑁𝑒𝑢𝑟𝑜𝑛1 1 𝑁𝑒𝑢𝑟𝑜𝑛2 1 𝑁𝑒𝑢𝑟𝑜𝑛1 2 1 1 Σ Σ Σ 𝑤10 1 𝒘 𝟏𝟏 𝟐 𝒘 𝟏𝟎 𝟐 𝑤22 1 𝑤21 1 𝑤20 1 𝑤1𝑛0 1 𝑤11 1 𝑤12 1 𝒘 𝟏𝟐 𝟐 𝑤2𝑛0 1 f f f 𝒐 𝟏 𝟐 𝑜2 1 𝑜1 1 𝑛𝑒𝑡1 1 𝒏𝒆𝒕 𝟏 𝟐 𝑛𝑒𝑡2 1 … … T e Back Propagate *1 '2 2 11 2 2 1 1 1 1 1 2 2 1 1 1 1 1 1e ff w E E e o net o a e o net o a                   ⋮
  • 53. Introduction to Neural Network • Radial Basis Function (RBF): – Similarity between input signal and prototype 53 ⋮ 𝑥1 𝑥n 𝑥2 𝑤 y ⋮ Gaussian Activation Function ⋮ ⋮
  • 54. Introduction to Neural Network 54 Σ Σ Σ . . . Neuron 1 Neuron m Neuron j⋮ ⋮ Σ y 𝑤1 𝑤 𝑚 𝑤𝑗 𝑛𝑒𝑡1 𝑛𝑒𝑡𝑗 𝑛𝑒𝑡 𝑚 𝑜1 1 𝑜 𝑚 1 𝑜𝑗 1 𝜙1 . 𝜙 𝑚 . 𝜙𝑗 . −𝑐1 −𝑐𝑗 −𝑐 𝑚 𝑥 • RBF: ⋮
  • 55. Introduction to Neural Network 55 𝑛𝑒𝑡𝑗 = ‖𝑥 − 𝑐𝑗‖ = 𝑥1 − 𝑐1𝑗 2 + 𝑥2 − 𝑐2𝑗 2 +. . . + 𝑥 𝑛 − 𝑐 𝑛𝑗 2 𝑜𝑗 1 = 𝜙 𝑛𝑒𝑡𝑗 𝜙 𝑛𝑒𝑡𝑗 = 𝑒 −1 2 𝑛𝑒𝑡 𝑗 𝜎 𝑗 2 𝑥 = 𝑥1, 𝑥2, . . . , 𝑥 𝑛 𝑐𝑗 = 𝑐1𝑗, 𝑐2𝑗, . . . , 𝑐 𝑛𝑗 𝜎 = 𝜎1, 𝜎2, . . . , 𝜎 𝑚 ′ 𝑤 = 𝑤1, 𝑤2, . . . , 𝑤 𝑚 ′ 𝑜1 = 𝑜1 1 , 𝑜2 1 , . . . , 𝑜 𝑚 1 ′
  • 56. Introduction to Neural Network • Training of RBF Networks: – – 56 𝑐𝑗 𝑘 + 1 = 𝑐𝑗 𝑘 − 𝜂 𝜕𝐸 𝜕𝑐𝑗 𝑘                 1 22 1 1 1 j j j j j j j j e w k x k c k o k k oE E e y k k c e y o c                  𝜎𝑗 𝑘 + 1 = 𝜎𝑗 𝑘 − 𝜂 𝜕𝐸 𝜕𝜎𝑗 𝑘              2 1 3 1 1 1 j j j j j j j e w k net o k k oE E e y k k e y o                   𝒄𝒋 : 𝝈𝒋 :
  • 57. Introduction to Neural Network • Recurrent Neural Network (RNN): 57 y(k+1) x(k) x(k-1) x(k-2) 𝑧−1 𝑧−1 𝑧−1 𝑧−1 𝑧−1 b y(k-2) y(k-1) y(k)
  • 58. Introduction to Neural Network • Feedback Types in Recurrent Neural Network: – Local (A) – Inter-layer (B) – Global (C) 58 X(k) y(k) A B C
  • 59. 𝑤𝑥X(k) y(k) 𝑤 𝑟,1 𝑤 𝑟,2 𝑤 𝑟,𝑛1 Introduction to Neural Network • Local feedback activation: 59 Feed Forward       1 x r i net k w x k w net k i       
  • 60. Introduction to Neural Network • Local output feedback: 60 𝑤𝑥X(k) y(k) 𝑤 𝑟,1 𝑤 𝑟,2 𝑤 𝑟,𝑛1 Feed Forward       0 1 x r j i net k w x k j w y k i             y k f net k
  • 61. Introduction to Neural Network • The Vanishing Gradient Problem: – Causes small gradients – Prevents the weights from updating 61 0.29 0.28999 InputSignal OutputSignal
  • 62. Introduction to Neural Network • The Exploding Gradient Problem: – Causes large gradients – The weights get away from their optimum value 62 0.29 1.872351 InputSignal OutputSignal
  • 63. Introduction to Neural Network 63 ⋮ • Elman Neural Network: ⋮ ⋮⋮ 𝑥1 𝑥2 𝑥 𝑛0 𝑥 𝑐1 𝑥 𝑐𝑛1 𝑥 𝑐2 𝑓1 𝑓1 𝑓1 𝑓2 𝑓2 𝑓2 cw xw yw 𝑜1 1 𝑜 𝑛1 1 ⋮ 𝑒1 𝑒 𝑛2 𝑒2 Hidden Layer 1 𝑇1 𝑇2 𝑇𝑛2 ⋮ ⋮ 𝑛1 𝑛2
  • 64. Introduction to Neural Network • Elman Neural Network: 64 Feed Forward               1 1 1 1 1 1 1 1 1 1 1x c o k f net k f w k x k w k o k              1 1cx o k          2 2 2 2 1 yo K f net k f w o k   
  • 65. Introduction to Neural Network • Elman Neural Network: 65 Back Propagate     2 2 1 1 2 n j j E k e k    '2 1 2 2 2 2 1 y y e f o E E e o net w e o net w                           1y y y E k w k w k w k       In the same way for 𝑤 𝑥
  • 66. Introduction to Neural Network • Jordan Neural Network: 66 ⋮⋮ 𝑥1 𝑥2 𝑥 𝑛0 𝑥 𝑐1 𝑥 𝑐𝑛2 𝑥 𝑐2 𝑓1 𝑓1 𝑓1 𝑓2 𝑓2 𝑓2 cw xw yw 𝑜1 1 𝑜 𝑛2 1 𝑦 𝑛2 𝑦2 𝑦1 ⋮ ⋮ ⋮ 𝑛1 𝑛2 Output Layer