Halaman Kami

Pengenalan Pola

Posted on Rabu, 25 Mei 2011 by ai-a-erial.blogspot.com | 0 komentar

membuat program untuk pengenalan pola


sebagai berikut :

%---------------------------------------------------

% PROGRAM JARINGAN SYARAF TIRUAN MENGENALI POLA SEGITIGA, SEGIEMPAT DAN LINGKARAN

% Oleh : AI-A-ERIAL
% Anggota :
% Eko susanto (0915031035)
% Robert lie n ( 0915031099)
% Imam baldi p ( 0915031089)
% Achmad taufik p (0915031077 )
% Leonardo simanullang ( 0715031053 )
%--------------------------------------------------


clear all;

clc;


disp('-------------------------------');

disp('Program JST 2 (multilayer)');

disp('-------------------------------');


w11 = input('masukkan nilai w11 = ');

w12 = input('masukkan nilai w12 = ');

w21 = input('masukkan nilai w21 = ');

w22 = input('masukkan nilai w22 = ');

v1 = input('masukkan nilai v1 = ');

v2 = input('masukkan nilai v2 = ');

b1 = input('masukkan nilai Treshoold pertama = ');

b2 = input('masukkan nilai Treshoold kedua= ');

b = input('masukkan nilai Treshoold ketiga= ');




x1=0;

x2=0;



n11=x1*w11+x2*w12-b1;


if n11 >= 0

a11 = 1;



elseif n11 < a11 =" 0;" x1="0;" x2="1;" n12="x1*w11+x2*w12-b1;">= 0

a12 = 1;



elseif n12 < a12 =" 0;" x1="1;" x2="0;" n13="x1*w11+x2*w12-b1;">= 0

a13 = 1;



elseif n13 < a13 =" 0;" x1="1;" x2="1;" n14="x1*w11+x2*w12-b1;">= 0

a14 = 1;



elseif n14 < a14 =" 0;" x1="0;" x2="0;" n21="x1*w21+x2*w22-b2;">= 0

a21 = 1;



elseif n21 < a21 =" 0;" x1="0;" x2="1;" n22="x1*w21+x2*w22-b2;">= 0

a22 = 1;



elseif n22 < a22 =" 0;" x1="1;" x2="0;" n23="x1*w21+x2*w22-b2;">= 0

a23 = 1;



elseif n23 < a23 =" 0;" x1="1;" x2="1;" n24="x1*w21+x2*w22-b2;">= 0

a24 = 1;



elseif n24 < a24 =" 0;" pilih ="input">');


switch pilih





case 1



x1=a11;

x2=a21;

y1=x1*v1+x2*v2-b;

disp(['iterasi 1, Nilai y1 = ' num2str(y1)]);

if y1 >= 0

disp('Fn = 1');

disp('error');

elseif y1 < fn =" 0');" x1="12;" x2="22;" y2="x1*v1+x2*v2-b;" y2 =" '">= 0

disp('Fn = 1');

disp('benar ');

elseif y2 < fn =" 0');" x1="13;" x2="23;" y3="x1*v1+x2*v2-b;" y3 =" '">= 0

disp('Fn = 1');

disp('benar ');

elseif y3 < fn =" 0');" x1="14;" x2="24;" y4="x1*v1+x2*v2-b;" y4 =" '">= 0

disp('Fn = 1');

disp('benar ');

elseif y4 < fn =" 0');" x1="a11;" x2="a21;" y1="x1*v1+x2*v2-b;" y1 =" '">= 0

disp('Fn = 1');

disp('error');

elseif y1 < fn =" 0');" x1="a12;" x2="a22;" y2="x1*v1+x2*v2-b;" y2 =" '">= 0

disp('Fn = 1');

disp('error');

elseif y2 < fn =" 0');" x1="a13;" x2="a23;" y3="x1*v1+x2*v2-b;" y3 =" '">= 0

disp('Fn = 1');

disp('error');

elseif y3 < fn =" 0');" x1="a14;" x2="a24;" y4="x1*v1+x2*v2-b;" y4 =" '">= 0

disp('Fn = 1');

disp('benar ');

elseif y4 < fn =" 0');" x1="a11;" x2="a21;" y1="x1*v1+x2*v2-b;" y1 =" '">= 0

disp('Fn = 1');

disp('benar ');

elseif y1 < fn =" 0');" x1="a12;" x2="a22;" y2="x1*v1+x2*v2-b;" y2 =" '">= 0

disp('Fn = 1');

disp('error');

elseif y2 < fn =" 0');" x1="a13;" x2="a23;" y3="x1*v1+x2*v2-b;" y3 =" '">= 0

disp('Fn = 1');

disp('error');

elseif y3 < fn =" 0');" x1="a14;" x2="a24;" y4="x1*v1+x2*v2-b;" y4 =" '">= 0

disp('Fn = 1');

disp('error');

elseif y4 < fn =" 0');" x1="a11;" x2="a21;" y1="x1*v1+x2*v2-b;" y1 =" '">= 0

disp('Fn = 1');

disp('benar ');

elseif y1 < fn =" 0');" x1="a12;" x2="a22;" y2="x1*v1+x2*v2-b;" y2 =" '">= 0

disp('Fn = 1');

disp('benar ');

elseif y2 < fn =" 0');" x1="a13;" x2="a23;" y3="x1*v1+x2*v2-b;" y3 =" '">= 0

disp('Fn = 1');

disp('benar ');

elseif y3 < fn =" 0');" x1="a14;" x2="a24;" y4="x1*v1+x2*v2-b;" y4 =" '">= 0

disp('Fn = 1');

disp('error');

elseif y4 < fn =" 0');" x1="a11;" x2="a21;" y1="x1*v1+x2*v2-b;" y1 =" '">= 0

disp('Fn = 1');

disp('error');

elseif y1 < fn =" 0');" x1="a12;" x2="a22;" y2="x1*v1+x2*v2-b;" y2 =" '">= 0

disp('Fn = 1');

disp('benar ');

elseif y2 < fn =" 0');" x1="a13;" x2="a23;" y3="x1*v1+x2*v2-b;" y3 =" '">= 0

disp('Fn = 1');

disp('benar ');

elseif y3 < fn =" 0');" x1="a14;" x2="a24;" y4="x1*v1+x2*v2-b;" y4 =" '">= 0

disp('Fn = 1');

disp('error');

elseif y4 < fn =" 0');" x1="a11;" x2="a21;" y1="x1*v1+x2*v2-b;" y1 =" '">= 0

disp('Fn = 1');

disp('benar ');

elseif y1 < fn =" 0');" x1="12;" x2="22;" y2="x1*v1+x2*v2-b;" y2 =" '">= 0

disp('Fn = 1');

disp('error');

elseif y2 < fn =" 0');" x1="13;" x2="23;" y3="x1*v1+x2*v2-b;" y3 =" '">= 0

disp('Fn = 1');

disp('error');

elseif y3 < fn =" 0');" x1="14;" x2="24;" y4="x1*v1+x2*v2-b;" y4 =" '">= 0

disp('Fn = 1');

disp('benar ');

elseif y4 < 0

disp('Fn = 0');

disp('error');

end;



end;

Proses Belajar

Posted on Minggu, 22 Mei 2011 by ai-a-erial.blogspot.com | 0 komentar

Pertemuan 7


Membuat JST dengan Scilab

Posted on Sabtu, 21 Mei 2011 by ai-a-erial.blogspot.com | 0 komentar

Pertemuan 6


1. Gambar Jaringan Syaraf Tiruan (JST) dengan 3 layer:
fw

Perhatikan notasi bobot setiap interkoneksi, dan variabel yang digunakan.
Rumusan yang digunakan untuk Forward :  dj=Σ(pi.wji)    hj=f(dj)    qm=Σ(hj.vmj)   a=f(qm)
dimana i= banyaknya input/masukan, j=banyaknya neuron di hidden layer, m= banyaknya neuron dioutput layer
d=hasil penjumlahan input kali bobot di hidden layer
h =  keluaran neuron di hidden layer,  merupakan fungsi aktifasi dari d
q=hasil penjumlahan h (keluran neuron di hidden layer)  kali bobot di output layer
a =  keluaran neuron di output layer/ keluran JST,  merupakan fungsi aktifasi dari q
2. Gambar Backpropagation
bw
3. Gambar Update Bobot di output layer
dv
rumusan update bobot antara hidden layer ke output layer:
v(t+1) = v(t) + Δ v(t)
Δ v(t) = η.e.f’(q).h
dimana :  t = iterasi ke …
v=bobot di output layer
η = learning rate (kecepatan penelajaran), nilainya berkisar antara  0<η≤1
e= error  (beda antara target dengan actual output JST )   e=target -a
h= keluaran neuron di hidden layer
f’(q) = turunan fungsi f(q) —> jika  a=f(q)=q then f’(q)=1 or jika f(q)=1/(1+exp(-q))
then f’(q)=f(q)(1-(f(q)) =a(1-a) a= actual output JST
4. Gambar Update bobot antara input layer ke  hidden layer
dw

Rumusan untuk update bobot w
w(t+1)= w(t) + Δw(t)
Δw(t) = η.e.f’(q).v.f’(d).p
dimana : w = bobot antara input layer ke hidden layer
v= bobot antara hidden layer ke output layer
f’(d) = turunan fungsi f(d),  jika  h=f(d)=d then f’(d) =1
jika digunakan h=f(d)=1/((1+exp(-d))  then f’(d) = f(d)(1-f(d))= h(1-h)

Backprogation NN

Posted on Jumat, 20 Mei 2011 by ai-a-erial.blogspot.com | 0 komentar

Pertemuan 5