• Tidak ada hasil yang ditemukan

BAB VI PENUTUP

6.2 Saran

Dari sistem yang dibuat masih diperlukan beberapa saran antara lain :

1. Prediksi yang dihasilkan sebaiknya tidak dijadikan acuan utama oleh pihak

sekolah, namun hanya sebagai sarana pendukung dalam memotivasi belajar

siswa menjelang Ujian Nasional.

2. Program bisa menerima masukan tidak hanya file berekstensi .csv saja, tapi

juga diharapkan dapat menerima masukan dari berbagai jenis file.

3. Program bisa lebih fleksibel dengan menerima masukan dengan jumlah

atribut yang bervariasi.

4. Proses pengolahan data training, proses prediksi, dan proses perhitungan

akurasi sistem sebaiknya tidak terintegrasi dengan database agar proses

menjadi lebih cepat.

113

Daftar Pustaka

Febrianto, Hieronymus Dimas, 2010, Klasifikasi Posisi Pemain NBS

Menggunakan Algoritma Decision Tree, Yogyakarta.

Indharlina, Asteria, 2010, Klasifikasi Data Penerimaan Mahasiswa Baru dan

Prestasi Akademik Mahasiswa Jurusan Teknik Informatika Universitas

Sanata Dharma dengan Menggunakan Algoritma Naïve Bayesian,

Yogyakarta.

Han, Jiawei and Micheline Kamber, 2001, Data Mining: Concepts and

Techniques, USA : Academic Press.

Hermawanov, T, 2008, Ujian Akhir Nasional (UAN) Sebagai Issue Kritis

Pendidikan.[online].(

http://titoreds.wordpress.com/2008/04/27/ujian-akhir-nasional-uan-sebagai-issue-kritis-pendidikan/ diakses pada tanggal 17

Januari 2011).

Santoso, Budi, 2007, Teknik Pemanfaatan Data Mining untuk Keperluan Bisnis,

Yogyakarta : Graha Ilmu.

Setiawan, Sari Indah Anatta, Penerapan Algoritma C4.5 untuk Memprediksi Nilai

Ujian Nasional Siswa SMA Berdasarkan Nilai Rapor dan Nilai Uji Coba

Nasional, Yogyakarta.

Tan, P., Michael, S., dan Vipin, K, 2005, Introduction to Data Mining. Boston :

Pearson Education,Inc.

_______, 2011, Ujian Nasional. [online]. (http://id.wikipedia.org/wiki/Ujian

Nasional - diakses pada tanggal 17 Januari 2011).

_______, 2011, Buku Rapor. [online]. (http://id.wikipedia.org/wiki/Buku_Rapor -

diakses pada tanggal 17 Januari 2011).

_______, 2010, Penggalian Data. [online]. (http://id.wikipedia.org/wiki/

Penggalian_Data - diakses pada tanggal 17 Januari 2011).

115

116

Berikut ini adalah daftar stored procedure yang digunakan :

1. spSimpanRange

DELIMITER $$

DROP PROCEDURE IF EXISTS `naive_bayes`.`spSimpanRange`$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `spSimpanRange`(in atas_a double,in bawah_a double,in atas_b double,in bawah_b double,in atas_c double,

in bawah_c double,in atas_d double,in bawah_d double,in atas_e double)

BEGIN

insert into kategori_nilai values('A',atas_a,bawah_a); insert into kategori_nilai values('B',atas_b,bawah_b); insert into kategori_nilai values('C',atas_c,bawah_c); insert into kategori_nilai values('D',atas_d,bawah_d); insert into kategori_nilai values('E',atas_e,0);

END$$ DELIMITER ;

2. spUpdateRange

DELIMITER $$

DROP PROCEDURE IF EXISTS `naive_bayes`.`spUpdateRange`$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `spUpdateRange`(in atas_a double,in bawah_a double,in atas_b double,in bawah_b double,in atas_c double,

in bawah_c double,in atas_d double,in bawah_d double,in atas_e double)

BEGIN

update kategori_nilai set batas_atas=atas_a, batas_bwh=bawah_a where kode_range="A";

update kategori_nilai set batas_atas=atas_b, batas_bwh=bawah_b where kode_range="B";

update kategori_nilai set batas_atas=atas_c, batas_bwh=bawah_c where kode_range="C";

update kategori_nilai set batas_atas=atas_d, batas_bwh=bawah_d where kode_range="D";

update kategori_nilai set batas_atas=atas_e, batas_bwh=0 where kode_range="E";

END$$ DELIMITER ;

DELIMITER $$

DROP PROCEDURE IF EXISTS `naive_bayes`.`spDeleteTraining`$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `spDeleteTraining`(in kode int) BEGIN

delete from ms_training where kode_mapel=kode; delete from klasifikasi_tr where kode_mapel=kode; delete from pola where kode_mapel=kode; END$$

DELIMITER ;

4. spSimpanTraining

DELIMITER $$

DROP PROCEDURE IF EXISTS `naive_bayes`.`spSimpanTraining`$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `spSimpanTraining`(in v_nama varchar(50),in v_sm1 double,in v_sm2 double,in v_sm3 double,in v_sm4 double,in v_sm5 double,in v_uco double,in v_un double)

BEGIN

declare var_id int;

select kode_mapel into var_id from mapel where nama_mapel like v_nama; insert into ms_training

values(var_id,v_sm1,v_sm2,v_sm3,v_sm4,v_sm5,v_uco,v_un); END$$

DELIMITER ;

5. spTransformasiNilai

DELIMITER $$

DROP PROCEDURE IF EXISTS `naive_bayes`.`spTransformasiNilai`$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `spTransformasiNilai`(in kode int) BEGIN

declare v_kode int;

declare v_1, v_2, v_3, v_4, v_5, v_uco, v_un double;

declare v_sem1, v_sem2, v_sem3, v_sem4, v_sem5, v_tryout, v_uan char; declare var_baris, var_jumlah int;

DECLARE done INT DEFAULT 0; declare cur1 cursor for SELECT

kode_mapel,sem_1,sem_2,sem_3,sem_4,sem_5,uco,un from ms_training where kode_mapel=kode and sem_1<>0 and sem_2<>0 and sem_3<>0 and sem_4<>0 and sem_5<>0 and uco<>0 and un<>0;

select count(*) into var_baris from ms_training where kode_mapel=kode and sem_1<>0 and sem_2<>0 and sem_3<>0 and sem_4<>0 and sem_5<>0 and uco<>0 and un<>0;

open cur1; repeat

Fetch cur1 into v_kode, v_1, v_2, v_3, v_4, v_5, v_uco, v_un; IF NOT done THEn

select kode_range into v_sem1 from kategori_nilai where batas_atas>=v_1 and batas_bwh<=v_1;

select kode_range into v_sem2 from kategori_nilai where batas_atas>=v_2 and batas_bwh<=v_2;

select kode_range into v_sem3 from kategori_nilai where batas_atas>=v_3 and batas_bwh<=v_3;

select kode_range into v_sem4 from kategori_nilai where batas_atas>=v_4 and batas_bwh<=v_4;

select kode_range into v_sem5 from kategori_nilai where batas_atas>=v_5 and batas_bwh<=v_5;

select kode_range into v_tryout from kategori_nilai where batas_atas>=v_uco*10 and batas_bwh<=v_uco*10;

select kode_range into v_uan from kategori_nilai where batas_atas>=v_un*10 and batas_bwh<=v_un*10;

insert into klasifikasi_tr values (v_kode,v_sem1, v_sem2, v_sem3, v_sem4, v_sem5, v_tryout, v_uan);

end if;

set var_jumlah = var_jumlah + 1; until var_jumlah=var_baris end repeat; close cur1;

END$$ DELIMITER ;

6. spPola

DELIMITER $$

DROP PROCEDURE IF EXISTS `naive_bayes`.`spPola`$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `spPola`(in kode varchar(50),in atribut int)

BEGIN

declare v_kode,count1,count2,count3,count4,count5,count6 int; declare count7_sem1,count8_sem1,count9_sem1,count10_sem1,count11_sem1, count12_sem1,count13_sem1,count14_sem1,count15_sem1,count16_sem1, count17_sem1,count18_sem1,count19_sem1,count20_sem1,count21_sem1, count22_sem1,count23_sem1,count24_sem1,count25_sem1,count26_sem1, count27_sem1,count28_sem1,count29_sem1,count30_sem1,count31_sem1 int; declare count7_sem2,count8_sem2,count9_sem2,count10_sem2,count11_sem2, count12_sem2,count13_sem2,count14_sem2,count15_sem2,count16_sem2, count17_sem2,count18_sem2,count19_sem2,count20_sem2,count21_sem2, count22_sem2,count23_sem2,count24_sem2,count25_sem2,count26_sem2,

declare count7_sem3,count8_sem3,count9_sem3,count10_sem3,count11_sem3, count12_sem3,count13_sem3,count14_sem3,count15_sem3,count16_sem3, count17_sem3,count18_sem3,count19_sem3,count20_sem3,count21_sem3, count22_sem3,count23_sem3,count24_sem3,count25_sem3,count26_sem3, count27_sem3,count28_sem3,count29_sem3,count30_sem3,count31_sem3 int; declare count7_sem4,count8_sem4,count9_sem4,count10_sem4,count11_sem4, count12_sem4,count13_sem4,count14_sem4,count15_sem4,count16_sem4, count17_sem4,count18_sem4,count19_sem4,count20_sem4,count21_sem4, count22_sem4,count23_sem4,count24_sem4,count25_sem4,count26_sem4, count27_sem4,count28_sem4,count29_sem4,count30_sem4,count31_sem4 int; declare count7_sem5,count8_sem5,count9_sem5,count10_sem5,count11_sem5, count12_sem5,count13_sem5,count14_sem5,count15_sem5,count16_sem5, count17_sem5,count18_sem5,count19_sem5,count20_sem5,count21_sem5, count22_sem5,count23_sem5,count24_sem5,count25_sem5,count26_sem5, count27_sem5,count28_sem5,count29_sem5,count30_sem5,count31_sem5 int; declare count7_uco,count8_uco,count9_uco,count10_uco,count11_uco, count12_uco,count13_uco,count14_uco,count15_uco,count16_uco, count17_uco,count18_uco,count19_uco,count20_uco,count21_uco, count22_uco,count23_uco,count24_uco,count25_uco,count26_uco, count27_uco,count28_uco,count29_uco,count30_uco,count31_uco int; declare jum1,jum2,jum3,jum4,jum5,jum6,jum7,jum8,jum9,jum10, jum11,jum12,jum13,jum14,jum15,jum16,jum17,jum18,jum19,jum20, jum21,jum22,jum23,jum24,jum25,jum26,jum27,jum28,jum29,jum30 double; select kode_mapel into v_kode from mapel where nama_mapel=kode; select count(*) into count1 from klasifikasi_tr where kode_mapel=v_kode; select count(*) into count2 from klasifikasi_tr where kode_mapel=v_kode and un='A';

select count(*) into count3 from klasifikasi_tr where kode_mapel=v_kode and un='B';

select count(*) into count4 from klasifikasi_tr where kode_mapel=v_kode and un='C';

select count(*) into count5 from klasifikasi_tr where kode_mapel=v_kode and un='D';

select count(*) into count6 from klasifikasi_tr where kode_mapel=v_kode and un='E';

select count(*) into count7_sem1 from klasifikasi_tr where kode_mapel=v_kode and sem_1='A' and un='A';

select count(*) into count8_sem1 from klasifikasi_tr where kode_mapel=v_kode and sem_1='A' and un='B';

select count(*) into count9_sem1 from klasifikasi_tr where kode_mapel=v_kode and sem_1='A' and un='C';

select count(*) into count10_sem1 from klasifikasi_tr where kode_mapel=v_kode and sem_1='A' and un='D';

select count(*) into count12_sem1 from klasifikasi_tr where kode_mapel=v_kode and sem_1='B' and un='A';

select count(*) into count13_sem1 from klasifikasi_tr where kode_mapel=v_kode and sem_1='B' and un='B';

select count(*) into count14_sem1 from klasifikasi_tr where kode_mapel=v_kode and sem_1='B' and un='C';

select count(*) into count15_sem1 from klasifikasi_tr where kode_mapel=v_kode and sem_1='B' and un='D';

select count(*) into count16_sem1 from klasifikasi_tr where kode_mapel=v_kode and sem_1='B' and un='E';

select count(*) into count17_sem1 from klasifikasi_tr where kode_mapel=v_kode and sem_1='C' and un='A';

select count(*) into count18_sem1 from klasifikasi_tr where kode_mapel=v_kode and sem_1='C' and un='B';

select count(*) into count19_sem1 from klasifikasi_tr where kode_mapel=v_kode and sem_1='C' and un='C';

select count(*) into count20_sem1 from klasifikasi_tr where kode_mapel=v_kode and sem_1='C' and un='D';

select count(*) into count21_sem1 from klasifikasi_tr where kode_mapel=v_kode and sem_1='C' and un='E';

select count(*) into count22_sem1 from klasifikasi_tr where kode_mapel=v_kode and sem_1='D' and un='A';

select count(*) into count23_sem1 from klasifikasi_tr where kode_mapel=v_kode and sem_1='D' and un='B';

select count(*) into count24_sem1 from klasifikasi_tr where kode_mapel=v_kode and sem_1='D' and un='C';

select count(*) into count25_sem1 from klasifikasi_tr where kode_mapel=v_kode and sem_1='D' and un='D';

select count(*) into count26_sem1 from klasifikasi_tr where kode_mapel=v_kode and sem_1='D' and un='E';

select count(*) into count27_sem1 from klasifikasi_tr where kode_mapel=v_kode and sem_1='E' and un='A';

select count(*) into count28_sem1 from klasifikasi_tr where kode_mapel=v_kode and sem_1='E' and un='B';

select count(*) into count29_sem1 from klasifikasi_tr where kode_mapel=v_kode and sem_1='E' and un='C';

select count(*) into count30_sem1 from klasifikasi_tr where kode_mapel=v_kode and sem_1='E' and un='D';

select count(*) into count31_sem1 from klasifikasi_tr where kode_mapel=v_kode and sem_1='E' and un='E';

select count(*) into count7_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='A' and un='A';

select count(*) into count8_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='A' and un='B';

select count(*) into count9_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='A' and un='C';

select count(*) into count10_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='A' and un='D';

select count(*) into count11_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='A' and un='E';

select count(*) into count12_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='B' and un='A';

select count(*) into count14_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='B' and un='C';

select count(*) into count15_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='B' and un='D';

select count(*) into count16_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='B' and un='E';

select count(*) into count17_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='C' and un='A';

select count(*) into count18_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='C' and un='B';

select count(*) into count19_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='C' and un='C';

select count(*) into count20_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='C' and un='D';

select count(*) into count21_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='C' and un='E';

select count(*) into count22_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='D' and un='A';

select count(*) into count23_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='D' and un='B';

select count(*) into count24_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='D' and un='C';

select count(*) into count25_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='D' and un='D';

select count(*) into count26_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='D' and un='E';

select count(*) into count27_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='E' and un='A';

select count(*) into count28_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='E' and un='B';

select count(*) into count29_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='E' and un='C';

select count(*) into count30_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='E' and un='D';

select count(*) into count31_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='E' and un='E';

select count(*) into count7_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='A' and un='A';

select count(*) into count8_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='A' and un='B';

select count(*) into count9_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='A' and un='C';

select count(*) into count10_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='A' and un='D';

select count(*) into count11_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='A' and un='E';

select count(*) into count12_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='B' and un='A';

select count(*) into count13_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='B' and un='B';

select count(*) into count14_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='B' and un='C';

select count(*) into count16_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='B' and un='E';

select count(*) into count17_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='C' and un='A';

select count(*) into count18_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='C' and un='B';

select count(*) into count19_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='C' and un='C';

select count(*) into count20_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='C' and un='D';

select count(*) into count21_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='C' and un='E';

select count(*) into count22_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='D' and un='A';

select count(*) into count23_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='D' and un='B';

select count(*) into count24_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='D' and un='C';

select count(*) into count25_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='D' and un='D';

select count(*) into count26_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='D' and un='E';

select count(*) into count27_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='E' and un='A';

select count(*) into count28_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='E' and un='B';

select count(*) into count29_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='E' and un='C';

select count(*) into count30_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='E' and un='D';

select count(*) into count31_sem2 from klasifikasi_tr where kode_mapel=v_kode and sem_2='E' and un='E';

select count(*) into count7_sem3 from klasifikasi_tr where kode_mapel=v_kode and sem_3='A' and un='A';

select count(*) into count8_sem3 from klasifikasi_tr where kode_mapel=v_kode and sem_3='A' and un='B';

select count(*) into count9_sem3 from klasifikasi_tr where kode_mapel=v_kode and sem_3='A' and un='C';

select count(*) into count10_sem3 from klasifikasi_tr where kode_mapel=v_kode and sem_3='A' and un='D';

select count(*) into count11_sem3 from klasifikasi_tr where kode_mapel=v_kode and sem_3='A' and un='E';

select count(*) into count12_sem3 from klasifikasi_tr where kode_mapel=v_kode and sem_3='B' and un='A';

select count(*) into count13_sem3 from klasifikasi_tr where kode_mapel=v_kode and sem_3='B' and un='B';

select count(*) into count14_sem3 from klasifikasi_tr where kode_mapel=v_kode and sem_3='B' and un='C';

select count(*) into count15_sem3 from klasifikasi_tr where kode_mapel=v_kode and sem_3='B' and un='D';

select count(*) into count16_sem3 from klasifikasi_tr where kode_mapel=v_kode and sem_3='B' and un='E';

select count(*) into count18_sem3 from klasifikasi_tr where kode_mapel=v_kode and sem_3='C' and un='B';

select count(*) into count19_sem3 from klasifikasi_tr where kode_mapel=v_kode and sem_3='C' and un='C';

select count(*) into count20_sem3 from klasifikasi_tr where kode_mapel=v_kode and sem_3='C' and un='D';

select count(*) into count21_sem3 from klasifikasi_tr where kode_mapel=v_kode and sem_3='C' and un='E';

select count(*) into count22_sem3 from klasifikasi_tr where kode_mapel=v_kode and sem_3='D' and un='A';

select count(*) into count23_sem3 from klasifikasi_tr where kode_mapel=v_kode and sem_3='D' and un='B';

select count(*) into count24_sem3 from klasifikasi_tr where kode_mapel=v_kode and sem_3='D' and un='C';

select count(*) into count25_sem3 from klasifikasi_tr where kode_mapel=v_kode and sem_3='D' and un='D';

select count(*) into count26_sem3 from klasifikasi_tr where kode_mapel=v_kode and sem_3='D' and un='E';

select count(*) into count27_sem3 from klasifikasi_tr where kode_mapel=v_kode and sem_3='E' and un='A';

select count(*) into count28_sem3 from klasifikasi_tr where kode_mapel=v_kode and sem_3='E' and un='B';

select count(*) into count29_sem3 from klasifikasi_tr where kode_mapel=v_kode and sem_3='E' and un='C';

select count(*) into count30_sem3 from klasifikasi_tr where kode_mapel=v_kode and sem_3='E' and un='D';

select count(*) into count31_sem3 from klasifikasi_tr where kode_mapel=v_kode and sem_3='E' and un='E';

select count(*) into count7_sem4 from klasifikasi_tr where kode_mapel=v_kode and sem_4='A' and un='A';

select count(*) into count8_sem4 from klasifikasi_tr where kode_mapel=v_kode and sem_4='A' and un='B';

select count(*) into count9_sem4 from klasifikasi_tr where kode_mapel=v_kode and sem_4='A' and un='C';

select count(*) into count10_sem4 from klasifikasi_tr where kode_mapel=v_kode and sem_4='A' and un='D';

select count(*) into count11_sem4 from klasifikasi_tr where kode_mapel=v_kode and sem_4='A' and un='E';

select count(*) into count12_sem4 from klasifikasi_tr where kode_mapel=v_kode and sem_4='B' and un='A';

select count(*) into count13_sem4 from klasifikasi_tr where kode_mapel=v_kode and sem_4='B' and un='B';

select count(*) into count14_sem4 from klasifikasi_tr where kode_mapel=v_kode and sem_4='B' and un='C';

select count(*) into count15_sem4 from klasifikasi_tr where kode_mapel=v_kode and sem_4='B' and un='D';

select count(*) into count16_sem4 from klasifikasi_tr where kode_mapel=v_kode and sem_4='B' and un='E';

select count(*) into count17_sem4 from klasifikasi_tr where kode_mapel=v_kode and sem_4='C' and un='A';

select count(*) into count18_sem4 from klasifikasi_tr where kode_mapel=v_kode and sem_4='C' and un='B';

Dokumen terkait