Ari$ficial Neural Network
(mul$layer perceptron)
PMR5406 Redes Neurais e Lógica Fuzzy Mul9layer Perceptrons
2
Arsitektur
Neuron
Y
input
w1
w2 w
nAc9va9on Func9on or
Transfer Func9on output
Back Propagation
• Error = E = output – expectedvalue
• Minimize E
2Activation Function
• Nilai Y dapat bervariasi dari –infinite s.d. +infinite
• Nilai Y ac$vated (=1) apabila Y > threshold
• Nilai Y not-‐ac$vated (=0) apabila Y < threshold
Threshold = 0
Sigmoid Function
Output = 1
1+ e -‐aY
Range: 0 s.d 1
PMR5406 Redes Neurais e Lógica Fuzzy Mul9layer Perceptrons
7
BACK-‐PROPAGATION
Func%on signals Forward Step
Error signals
Backward Step
Back Propagation
adalah parameter Learning Rate
adalah sensi9vitas error E 2 terhadap W AB
Weka
• Explorer à Mul9layerPerceptron
u -‐L <learning rate>
u Learning Rate for the backpropaga9on algorithm. (Value should be between 0 -‐ 1, Default = 0.3).
u -‐M <momentum>
u Momentum Rate for the backpropaga9on algorithm. (Value should be between 0 -‐ 1, Default = 0.2).
u -‐N <number of epochs>
u Number of epochs to train through. (Default = 500).
u -‐V <percentage size of valida9on set> (Default = 0) u -‐S <seed>
u The value used to seed the random number generator (Value should be >= 0 and and a long, Default = 0).
u -‐E <threshold for number of conseque9ve errors> (Default = 20) u -‐H <comma seperated numbers for nodes on each layer>
u The hidden layers to be created for the network. (Value should be a list of comma separated Natural numbers or the lebers 'a' = (abribs + classes) / 2, 'i' = abribs, 'o'
= classes, 't' = abribs .+ classes) for wildcard values, Default = a).
Weka: Multilayer Perceptron
• -‐L 0.3 –M 0.2 –N 500 –V 0 –S 0 –E 20 –H a
• Example Data
@RELATION Iris
@ATTRIBUTE sepallength NUMERIC
@ATTRIBUTE sepalwidth NUMERIC
@ATTRIBUTE petallength NUMERIC
@ATTRIBUTE petalwidth NUMERIC
@ATTRIBUTE class {Iris-‐setosa,Iris-‐versicolor,Iris-‐virginica}
@DATA
5.1,3.5,1.4,0.2,Iris-‐setosa 4.9,3.0,1.4,0.2,Iris-‐setosa 4.7,3.2,1.3,0.2,Iris-‐setosa 4.6,3.1,1.5,0.2,Iris-‐setosa 7.0,3.2,4.7,1.4,Iris-‐versicolor 6.4,3.2,4.5,1.5,Iris-‐versicolor 6.9,3.1,4.9,1.5,Iris-‐versicolor 5.5,2.3,4.0,1.3,Iris-‐versicolor 6.5,2.8,4.6,1.5,Iris-‐versicolor 5.7,2.8,4.5,1.3,Iris-‐versicolor 7.7,3.0,6.1,2.3,Iris-‐virginica 6.3,3.4,5.6,2.4,Iris-‐virginica 6.4,3.1,5.5,1.8,Iris-‐virginica 6.0,3.0,4.8,1.8,Iris-‐virginica 6.9,3.1,5.4,2.1,Iris-‐virginica
%