JAWABAN UJIAN AKHIR SEMESTER NEURAL NETWORK MUHAMMAD YUDHA SYUHADA 167038075 PROGRAM STUDI MAGISTER TEKNIK INFORMATIKA FAKULTAS ILMU KOMPUTER DAN TEKNOLOGI INFORMASI UNIVERSITAS SUMATERA UTARA MEDAN 2017 1. Source code matlab dengan inputan 5 layer (X1, X2, X3, X4, X5), 1 hidden layer dan 1 output layer % Mempersiapkan data latih dan target latih % data latih berupa matriks (X1;X2;X3;X4;X5) => 5 x 50 data_latih = [90,85,80,85,85,85,90,85,85,80,70,90,85,80,85,85,85,90,85,85,80,70,90,85,80 ,85,85,85,80,80,85,90,85,85,80,70,90,85,80,85,85,85,80,80,85,70,80,85,91,85 ;... 85,85,85,90,90,90,85,95,85,90,80,85,85,85,90,90,90,85,95,85,90,80,85,85,85, 90,90,90,85,85,90,85,95,85,90,80,85,85,85,90,90,90,85,85,85,20,85,90,85,95; ... 90,85,80,85,90,80,85,85,85,90,75,90,78,89,76,65,56,87,45,45,98,75,90,90,43, 34,56,49,85,75,78,56,89,93,76,75,96,78,66,76,89,90,85,67,78,87,90,78,74,58; ... 70,78,71,72,76,78,76,81,77,70,71,70,78,71,72,76,78,76,81,77,70,71,70,78,71, 72,76,74,71,70,78,76,81,77,70,71,70,78,71,72,76,74,71,70,73,70,80,78,76,81; ... 66,61,66,60,57,66,67,62,65,70,78,66,61,66,60,57,66,67,62,65,70,78,66,61,66, 60,57,54,60,58,66,67,62,65,70,78,66,61,66,60,57,54,60,58,54,30,70,66,67,62] ; % isi target dengan menjadi matriks 1 x 50 target_latih = [74,73,72,72,72,75,76,76,75,75,75,74,73,73,71,70,73,76,72,71,76,75,74,74,69 ,67,69,66,70,68,75,73,76,75,74,75,75,73,71,71,72,70,70,67,68,51,78,75,75,73 ]; [~,N] = size(data_latih); % Pembuatan JST %[1 1] menunjukkan hidden layer 1 dan output 1 net = newff(minmax(data_latih),[1 1],{'logsig','purelin'},'traingdx'); %inisialisasi bobot hidden layer net.IW{1,1} = [-7.62,0.97,-2.60,-9.55,0.5]; %inisialisasi bobot output layer net.LW{2,1} = [-2.40]; %inisialisasi bias net.b{1,1} = [1]; %inisialisasi bias yang langsung ke output layer net.b{2,1} = [1]; % Memberikan nilai untuk mempengaruhi proses pelatihan net.performFcn = 'mse'; net.trainParam.goal = 0.01; net.trainParam.show = 20; net.trainParam.epochs = 1000; net.trainParam.mc = 0.95; net.trainParam.lr = 0.1; % Proses training [net_keluaran,tr,Y,E] = train(net,data_latih,target_latih); % Hasil setelah pelatihan bobot_hidden = net_keluaran.IW{1,1}; bobot_keluaran = net_keluaran.LW{2,1}; bias_hidden = net_keluaran.b{1,1}; bias_keluaran = net_keluaran.b{2,1}; jumlah_iterasi = tr.num_epochs; nilai_keluaran = Y; nilai_error = E; error_MSE = (1/N)*sum(nilai_error.^2); bobot_hidden bobot_keluaran bias_hidden bias_keluaran 2. Hasil bobot dari pelatihan W1 = -7.6200 W2 = 0.9700 W3 = -2.6000 W4 = -9.5500 W5 = 0.5000 W6 = 1 W7 = 72.2600 W8 = -2.4000 3. Gambar / Screenshot