Tiruan
Pengenalan Pola
synapse axon
nucleus
cell body
dendrites
Struktur Neuron
A neuron has a cell body, a branching input
structure (the dendrite) and a branching
output structure (the axon)
−single-layer feed-forward
−multi-layer feed-forward
−recurrent
3-4-2 Network
Input Output
layer layer
Hidden Layer
Neural Networks NN 1 19
FUNGSI-FUNGSI AKTIVASI
●The choice of activation function determines the neuron model.
●Transforms neuron’s input into output.
23
PERCEPTRON
−The perceptron was first proposed by Rosenblatt (1958) is a
simple neuron that is used to classify its input into one of two
categories.
−A perceptron uses a step function that returns +1 if weighted
sum of its input 0 and -1 otherwise
1 if v 0
(v )
1 if v 0
b (bias)
x1
w1
v y
x2 w2
(v)
wn
xn
Perceptron Learning Rule
1 W1
X1 W1
W2
Y X1 Y
W2
W3
Threshold=2
Threshold=0
X2
X2
Example: perceptron learning
• Suppose we want to train a perceptron to compute
AND
training set: x1 = 1, x2 = 1 1
x1 = 1, x2 = -1 -1
x1 = -1, x2 = 1 -1
x1 = -1, x2 = -1 -1
1 x1 x2
1 x1 x2
Example: perceptron learning (cont.)
DONE!
1 x1 x2
Bias X1 X2
DONE!
1 x1 x2
No Need Weights Update!
Perceptron: Limitations
●The perceptron can only model linearly separable functions,
− those functions which can be drawn in 2-dim graph and single
straight line separates values in two part.
●Boolean functions given below are linearly separable:
− AND
− OR
− COMPLEMENT
●It cannot model XOR function as it is non linearly separable.
− When the two classes are not linearly separable, it may be desirable
to obtain a linear separator that minimizes the mean squared error.
Perceptron Limitations
• A single layer perceptron can only learn linearly separable problems.
• Boolean AND function is linearly separable,
whereas Boolean XOR function is not.
OR
Fungsi OR
X1 X2 Y
X1 2 0 0 0
0 1 1
Y 1 0 1
1 1 1
Threshold=2
2
X2
In-class exercise
• specify weights and thresholds to compute OR
INPUT: x1 = 1, x2 = 1
w1*1 + w2*1 >= OUTPUT: 1
INPUT: x1 = 1, x2 = -1
w1*1 + w2*-1 >= OUTPUT: 1
w1 w2
INPUT: x1 = -1, x2 = 1
w1*-1 + w2*1 >= OUTPUT: 1
x1 x2
INPUT: x1 = -1, x2 = -1
w1*-1 + w2*-1 < OUTPUT: -1
Real Estate Appraiser
Real Estate Appraiser
Real Estate Appraiser
• Illustrates that a
neural network
(feed-forward in
this case) is filled
with seemingly
meaningless
weights
• The appraised value
of this property is
$176,228 (not a bad
deal for San Diego!)