You are on page 1of 20

$ll0 F0f00lf0

$ll0 F0f00lf0
Machine Learning Team
PENS - TS 2006
Machine Learning Team
PENS TS, Surabaya 2006
t 0.0
y
x
W -1.5
W 1
1
l8fl8 8000f088
Machine Learning Team
PENS TS, Surabaya 2006
F0f00lf0


0
Machine Learning Team
PENS TS, Surabaya 2006
088lk80 0f00lf0 0lf080l88lk8F
AND XOR
Input 1 0 0 1 1 0 0 1 1
Input 2 0 1 0 1 0 1 0 1
Output 0 0 0 1 0 1 1 0
Machine Learning Team
PENS TS, Surabaya 2006
0,0
0,1
1,0
1,1
0,0
0,1
1,0
1,1
AND
XOR
Fungsi yang dapat dipisahkan disebut Linearly Separable
Hanya fungsi Linearly Separable dapat dipisahkan dengan
perceptron
088lk80 0f00lf0 0lf080l88lk8F
Machine Learning Team
PENS TS, Surabaya 2006
Fungsi Linearly Separable dapat digunakan untuk lebih dari
3 dimensi - tapi sangat sulit digambarkan
088lk80 0f00lf0 0lf080l88lk8F
Machine Learning Team
PENS TS, Surabaya 2006
1f8ll 800080 0f00lf0
AND
Input 1 0 0 1 1
Input 2 0 1 0 1
Output 0 0 0 1
Machine Learning Team
PENS TS, Surabaya 2006
t 0.0
y
x
1
W -0.3
W -0.4
W 0.5
I
1
I
2
I
3
Penjumlahan Output
0 0 1 (0*0.5) (0*-0.4) (1*-0.3) -0.3 0
0 1 1 (0*0.5) (1*-0.4) (1*-0.3) -0.7 0
1 0 1 (1*0.5) (0*-0.4) (1*-0.3) 0.2 1
1 1 1 (1*0.5) (1*-0.4) (1*-0.3) -0.2 0
1f8ll 800080 0f00lf0
Machine Learning Team
PENS TS, Surabaya 2006
F0M00l8(8f8
WhiIe(epoch menghasiIkan error)
...
Err = T - O
If Err <> 0 then
W
j
= W
j
+ LR * I
j
* Err
End If
End
Machine Learning Team
PENS TS, Surabaya 2006
WhiIe(epoch menghasiIkan error)
.
Err = T - O
If Err <> 0 then
W
j
= W
j
+ LR * I
j
* Err
End If
End
Epoch :Set training pada jaringan
KasusAND epoch berisi 4 set dari input
dipresentasikan pada jaringan(|0,0|, |0,1|, |1,0|, |1,1|)
F0M00l8(8f8
Machine Learning Team
PENS TS, Surabaya 2006
WhiIe(epoch menghasiIkan error)
.
Err = T - O
If Err <> 0 then
W
j
= W
j
+ LR * I
j
* Err
End If
End
Nilai Training, T : Training sebuah jaringan
Kita tidak hanya memperhatikan input tetapi juga nilai yang
dihasilkan jaringan. Contoh jika kita mempresentasikan jaringan
dengan|1,1| untuk Iungsi AND nilai training 1
F0M00l8(8f8
Machine Learning Team
PENS TS, Surabaya 2006
WhiIe(epoch menghasiIkan error)
.
Err = T - O
If Err <> 0 then
W
j
= W
j
+ LR * I
j
* Err
End If
End
Error, Err : Nilai error
adalah perbedaan nilai output dari jaringan dengan nilai
training. Contoh jika kita membutuhkan jaringan untuk
training 0 dan output 1, maka Err -1
F0M00l8(8f8
Machine Learning Team
PENS TS, Surabaya 2006
WhiIe(epoch menghasiIkan error)
.
Err = T - O
If Err <> 0 then
W
j
= W
j
+ LR * I
j
* Err
End If
End
Output dari Neuron, O :
Ij : Input dari neuron
Wj : Bobot dari input neuron (I
j
) ke output neuron
LR : Learning Rate.
Bagaimana membuat jaringan konvergen?
set dari eksperiment biasanya (0.1)
F0M00l8(8f8
Machine Learning Team
PENS TS, Surabaya 2006
0,0
0,1
1,0
1,1
I
1
I
2
AIter First Epoch
0,0
0,1
1,0
1,1
I
1
I
2
Konvergen
Catatan
I
1
point W
0
/W
1
I
2
point W
0
/W
2
F0M00l8(8f8
Machine Learning Team
PENS TS, Surabaya 2006
l0l 08 l8f0l 80
x|0 0;
0 1;
1 0;
1 1|;
t|0;
0;
0;
1|;
t 0.0
1
y
x
W ?
W ?
W ?
Machine Learning Team
PENS TS, Surabaya 2006
N008fl 0000l l0f08lkF
pembelajaran untuk mendapatkan bobot terbaik
Ior itr1:jumlahiterasi
Ior p1:jumlahpattern
Ior i1:jumlahtarget
O(i)input(p,:)*w(:,i);
iI(O(i)~0.0)
out(i)1;
else
out(i)0;
end
ERR(i)target(p,i)-out(i);
iI(ERR(i)~0)
Ior j1:jumlahinput1
w(j,i)w(j,i)LR*input(p,j)*ERR(i);
end
end
end
end
end
inisialisasi bobot
w||;
Ior j1:jumlahinput1
Ior i1:jumlahtarget
w(j,i)0.15*(2*rand-1);
end
end
Machine Learning Team
PENS TS, Surabaya 2006
N00ll0 k0l08f8 (8fl8
Iunction outputRunNN(input, w, target)
menghitung keluaran jaringan
jumlahinputsize(input,2);
jumlahtargetsize(target,2);
input(jumlahinput1)1;
outputzeros(jumlahtarget,1);
Ior i1:jumlahtarget
outinput*w(:,i);
iI(out~0.0)
output(i)1;
else
output(i)0;
end
end
Machine Learning Team
PENS TS, Surabaya 2006
N0lll 00l0l F0f00lf0
Menggunakan single perceptron untuk membagi data input
dalam beberapa katagori
Machine Learning Team
PENS TS, Surabaya 2006
l0l 08 l8f0l 8090 80M0l
a
b
c
d
e
I
g
x|1 1 1 1 1 1 0;
0 1 1 0 0 0 0;
1 1 0 1 1 0 1;
1 1 1 1 0 0 1;
0 1 1 0 0 1 1;
1 0 1 1 0 1 1;
0 0 1 1 1 1 1;
1 1 1 0 0 0 0;
1 1 1 1 1 1 1;
1 1 1 0 0 1 1|;
a b c d e I g
0
1
2
3
4
5
6
7
8
9
Machine Learning Team
PENS TS, Surabaya 2006
18f0l 08fl 8090 80M0l
t|1 0 0 0 0 0 0 0 0 0;
0 1 0 0 0 0 0 0 0 0;
0 0 1 0 0 0 0 0 0 0;
0 0 0 1 0 0 0 0 0 0;
0 0 0 0 1 0 0 0 0 0;
0 0 0 0 0 1 0 0 0 0;
0 0 0 0 0 0 1 0 0 0;
0 0 0 0 0 0 0 1 0 0;
0 0 0 0 0 0 0 0 1 0;
0 0 0 0 0 0 0 0 0 1|;
0 1 2 3 4 5 6 7 8 9

You might also like