1c Perceptrons4
1c Perceptrons4
3 4
Artificial Neural Networks McCulloch & Pitts Model of a Single Neuron
5 6
x2
" 1, if s>0
g(s) =
0, if s<0
Technically, this is called the step function if g(0) = 1 and the Heaviside function if
g(0) = 0.5 (but, we will use the two terms interchangeably). x1
(Later, other transfer functions were introduced, which are continuous and smooth) Answer: linearly separable functions
7 8
Linear Separability Rosenblatt Perceptron
9 10
wk ← wk + η xk wk ← wk − η xk
w0 ← w0 + η w0 ← w0 − η
! !
so s ← s + η (1 + x2k ) so s ← s − η (1 + x2k )
k k
otherwise, weights are unchanged. (η > 0 is called the learning rate)
Theorem: This will eventually learn to classify the data correctly,
as long as they are linearly separable.
11 12
Perceptron Learning Example Training Step 1
x1
❍
❍
❍❍ x2
w1 ❍❍ 0.2 x1 + 0.0 x2 − 0.1 > 0
❥
❍
Σ → (+/−) ✲
✯
✟
w2 ✟✟✟ w1 x1 + w2 x2 + w0 > 0
✟ ✕
✁ w1 ← w1 − η x1 = 0.1
✟✟ ✁ learning rate η = 0.1
(1,1) w2 w2 − η x2 =
x2 ✁w0 begin with random weights ← −0.1
✁ w1 = 0.2 w0 ← w0 − η = −0.2
✁
w2 = 0.0
1
w0 = −0.1
x1
13 14
15 16
Final Outcome Limitations of Perceptrons
Problem: many useful functions are not linearly separable (e.g. XOR)
x2 I1 I1 I1
1 1 1
17 18
19 20