KLASIFIKASI STATUS GIZI NARAPIDANA DEWASA MENGGUNAKAN METODE DECISION TREE C4.5 (Studi Kasus : Lembaga Pemasyarakatan Klas IIA Sidoarjo)
TUGAS AKHIR Sebagai Persyaratan Guna Meraih Gelar Sarjana Strata 1 Teknik Informatika Universitas Muhammadiyah Malang
Oleh : Novero Bayu Setiawan 201110370311364
JURUSAN TEKNIK INFORMATIKA FAKULTAS TEKNIK UNIVERSITAS MUHAMMADIYAH MALANG 2016
KATA PENGANTAR Dengan memanjatkan puji syukur kehadirat Allah SWT. Atas limpahan rahmat dan hidayah-NYA sehingga penulis dapat menyelesaikan tugas akhir yang berjudul : “KLASIFIKASI STATUS GIZI NARAPIDANA DEWASA MENGGUNAKAN METODE DECISION TREE C4.5 (Studi Kasus : Lembaga Pemasyarakatan Klas IIA Sidoarjo)” Tak lupa juga melalui kesempatan yang sangat berharga ini penulis menyampaikan ucapan terima kasih yang sebesar-besarnya kepada semua pihak yang telah membantu dan terlibat dalam penyelesaian tugas akhir ini. Kesempurnaan hanyalah milik Allah SWT, untuk itu penulis menyadari bahwa apa yang penulis susun ini jauh dari kata sempurna. Karena itu penulis mengharapkan kritik, saran dan pendapat yang sifatnya membangun. Terima kasih untuk segala perhatiannya. Penulis berharap semoga tugas akhir ini dapat bermanfaat dan berguna bagi semua pihak.
Malang, 22 Juli 2016
Penulis
DAFTAR ISI LEMBAR PERSETUJUAN .............................................................................................. i LEMBAR PENGESAHAN .............................................................................................. ii LEMBAR PERNYATAAN ............................................................................................. iii ABSTRAK ........................................................................................................................ iv ABSTRACT ....................................................................................................................... v LEMBAR PERSEMBAHAN .......................................................................................... vi KATA PENGANTAR ..................................................................................................... vii DAFTAR ISI................................................................................................................... viii DAFTAR GAMBAR ......................................................................................................... x DAFTAR TABEL ........................................................................................................... xii BAB I PENDAHULUAN 1.1 Latar Belakang .............................................................................................................. 1 1.2 Rumusan Masalah ......................................................................................................... 2 1.3 Batasan Masalah ........................................................................................................... 3 1.4 Tujuan Penelitian .......................................................................................................... 3 1.5 Metodologi .................................................................................................................... 3 1.5.1 Studi Pustaka ................................................................................................... 3 1.5.2 Data dan Pengumpulan (colleting)Data .......................................................... 4 1.5.3 Analisa dan Perancangan Sistem .................................................................... 4 1.5.4 Implementasi Sistem ....................................................................................... 5 1.5.5 Pengujian Sistem ............................................................................................. 5 1.5.6 Penyusunan Laporan Tugas Akhir .................................................................. 5 1.6 Sistematika Penulisan ................................................................................................... 5 BAB II LANDASAN TEORI 2.1 Pengertian Status Gizi ................................................................................................... 7 2.2 Penilaian Status Gizi ..................................................................................................... 7 2.2.1 Antropometri ................................................................................................... 8 2.3 Indeks Antropometri ..................................................................................................... 8 2.3.1 Cara Mengukur Indeks Massa Tubuh ............................................................ 9 2.3.2 Kategori Indeks Massa Tubuh ....................................................................... 9 2.4 Klasifikasi ................................................................................................................... 10 2.4.1 Proses Pekerjaan Klasifikasi ......................................................................... 10 2.5 Pengenalan Metode Decision Tree ............................................................................. 11 2.5.1 Pemilihan Metode Decision Tree .................................................................. 11 2.5.2 Konsep Decision Tree ................................................................................. 12 2.5.3 Algoritma C4.5 ............................................................................................. 14 2.5.4 Proses Perhitungan Decision Tree C4.5 ........................................................ 14 2.6 Java ............................................................................................................................. 16 2.6.1Versi Awal Java ............................................................................................. 16 2.6.2 Kelebihan Java .............................................................................................. 17 2.6.3 Kekurangan Java ........................................................................................... 18 2.7 Database ...................................................................................................................... 18 2.7.1 MySQL ......................................................................................................... 18
2.7.2 Kelebihan MySQL ........................................................................................ 18 2.7.3 Kekurangan MySQL ..................................................................................... 19 2.8 Weka ........................................................................................................................... 19 BAB III ANALISA DAN PERANCANGAN SISTEM 3.1 Analisa Kebutuhan Sistem .......................................................................................... 20 3.1.1 Bahasa Pemrograman yang digunakan ......................................................... 20 3.1.2 Analisa Sistem Yang Sudah Ada .................................................................. 20 3.1.3 Analisa Kebutuhan Fungsional ..................................................................... 21 3.1.4 Analisis Keburtuhan Non Fungsional ........................................................... 21 3.1.5 Analisa Data Status Gizi ............................................................................... 22 3.1.6 Analisa Algoritma ......................................................................................... 23 3.1.6.1 Perancangan Decision Tree ................................................................ 23 3.1.6.2 Cara Perhitungan Metode Decision Tree C4.5 .................................. 26 3.2 Perancangan Sistem .................................................................................................... 42 3.2.1 Usecase Diagram .......................................................................................... 42 3.2.2 Activity Diagram .......................................................................................... 44 3.2.3 Class Diagram ............................................................................................... 49 3.2.4 Perncangan Database .................................................................................... 50 BAB IV IMPLEMENTASI DAN PENGUJIAN 4.1 Implementasi Sistem ................................................................................................... 52 4.2 Kebutuhan Sistem ....................................................................................................... 52 4.3 Implementasi Interface ................................................................................................ 53 4.3.1 Tampilan Halaman Login ............................................................................. 53 4.3.2 Halaman Utama ............................................................................................ 54 4.3.3 Halaman Form Analisa ................................................................................. 55 4.3.4 Halaman About Me ....................................................................................... 57 4.3.5 Halaman Help ............................................................................................... 58 4.3.6 Halaman Laporan .......................................................................................... 58 4.3.7 Halaman Manajemen Data Training ............................................................. 60 4.4 Implementasi Database ............................................................................................... 63 4.5 Pengujian Sistem ......................................................................................................... 65 BAB V KESIMPULAN DAN SARAN 5.1 Kesimpulan ................................................................................................................. 68 5.2 Saran ........................................................................................................................... 68 DAFTAR PUSTAKA ...................................................................................................... 67
DAFTAR GAMBAR Gambar 2.1 Proses Pekerjaan Klasifikasi ......................................................................... 10 Gambar 2.2 Contoh Decision Tree ................................................................................... 13 Gambar 3.1 Analisa Data Awal ....................................................................................... 22 Gambar 3.2 Rancangan Algoritma Decision Tree .......................................................... 24 Gambar 3.3 Bagan Flowchat Sistem ............................................................................... 25 Gambar 3.4 Pseudocode Decision Tree .......................................................................... 26 Gambar 3.5 Hasil pembentukkan cabang di node 2 ......................................................... 35 Gambar 3.6 Hasil pembentukkan cabang di node 3 ......................................................... 39 Gambar 3.7 Hasil pohon keputusan (decision tree) status gizi ......................................... 42 Gambar 3.8 Usecase Klasifikasi Status Gizi Narapidana Dewasa.................................... 43 Gambar 3.9 Activity Diagram Login ................................................................................ 44 Gambar 3.10 Activity Diagram Update Data Training ..................................................... 45 Gambar 3.11 Activity Diagram Delete Data Training ...................................................... 46 Gambar 3.12 Activity Diagram Import Data Training ..................................................... 47 Gambar 3.13 Activity Diagram Penentuan Status Gizi .................................................... 48 Gambar 3.14 Activity Diagram Laporan .......................................................................... 49 Gambar 3.15 Class Diagram Klasifikasi Status Gizi Narapidana Dewasa ....................... 50 Gambar 3.18 Entity Relationship Diagram ....................................................................... 51 Gambar 4.1 Halaman Login .............................................................................................. 53 Gambar 4.2 Halaman Utama............................................................................................. 54 Gambar 4.3 Halaman Analisa ........................................................................................... 55 Gambar 4.4 Halaman About Me ....................................................................................... 57 Gambar 4.5 Halaman Help ............................................................................................... 58 Gambar 4.6 Halaman Laporan .......................................................................................... 59 Gambar 4.7 Halaman Manajemen Data Training ............................................................. 60 Gambar 4.8 Tabel Data User ............................................................................................ 64 Gambar 4.9 Tabel Data Narapidana .................................................................................. 64 Gambar 4.10 Tabel Data Training .................................................................................... 64 Gambar 4.11 Tabel Data Tes ............................................................................................ 65 Gambar 4.12 Grafik Hasil Pengujian .............................................................................. 66
DAFTAR TABEL Tabel 2.1 Kategori Batas Ambang IMT untuk Indonesia ................................................... 9 Tabel 2.2 Kategori IMT Berdasarkan WHO (2000) ........................................................... 9 Tabel 2.3 Perbandingan Decision Tree Dengan Algoritma Naive Bayes ......................... 12 Tabel 3.1 Contoh Data Status Gizi Narapidana Dewasa .................................................. 27 Tabel 3.2 Posisi v untuk pemecahan fitur tinggi badan di node akar ............................... 30 Tabel 3.3 Posisi v untuk pemecahan fitur berat badan di node akar ................................. 30 Tabel 3.4 Posisi v untuk pemecahan fitur lingkar pergelangan tangan di node akar ........ 31 Tabel 3.5 Posisi v untuk pemecahan fitur lingkar perut di node akar ............................... 31 Tabel 3.6 Posisi v untuk pemecahan fitur usia di node akar ............................................. 32 Tabel 3.7 Hasil perhitungan entropy dan gain untuk node akar ....................................... 32 Tabel 3.8 Hasil pemisahan data menurut node akar ......................................................... 33 Tabel 3.9 Posisi v untuk pemecahab fitur tinggi badan di node 2 .................................... 33 Tabel 3.10 Posisi v untuk pemecahan fitur berat badan di node 2 ................................... 33 Tabel 3.11Posisi v untuk pemecahan fitur lingkar pergelangan tangan di node 2............ 34 Tabel 3.12 Posisi v untuk pemecahan fitur lingkar perut di node 2 ................................. 34 Tabel 3.13 Posisi v untuk pemecahan fitur usia di node 2 ................................................ 34 Tabel 3.14 Hasil perhitungan entropy dan gain node 2 .................................................... 35 Tabel 3.15 Hasil pemisahan data menurut node 3 ............................................................ 36 Tabel 3.16 Posisi v untuk pemecahan fitur tinggi badan di node 3 .................................. 36 Tabel 3.17 Posisi v untuk pemecahan fitur berat badan di node 3 ................................... 36 Tabel 3.18 Posisi v untuk pemecahan fitur lingkar pergelangan tangan di node 3........... 37 Tabel 3.19 Posisi v untuk pemecahan fitur lingkar perut di node 3 ................................. 37 Tabel 3.20 Posisi v untuk pemecahan fitur usia di node 3 ................................................ 38 Tabel 3.21 Hasil perhitungan entropy dan gain untuk node 3 .......................................... 38 Tabel 3.22 Pemisahan data menurut node 7 ..................................................................... 39 Tabel 3.23 Posisi v untuk pemecahan fitur tinggi badan di node 7 .................................. 39 Tabel 3.24 Posisi v untuk pemecahan fitur berat badan di node 7 ................................... 40 Tabel 3.25 Posisi v untuk pemecahan fitur lingkarpergelangan tangan di node 7............ 40 Tabel 3.26 Posisi v untuk pemecahan fitur lingkar perut di node 7 ................................. 40 Tabel 3.27 Posisi v untuk pemecahan fitur usia di node 7................................................ 41
Tabel 3.28 Hasil perhitungan entropy dan gain untuk node 7 .......................................... 41 Tabel 4.1 Hasil Pengujian ................................................................................................. 65
DAFTAR PUSTAKA [1] Prasetyo, Eko. (2014). Data Mining Mengolah Data Menjadi Informasi Menggunakan Matlab, Yogyakarta:Penerbit CV. Andi Offset. [2] Dwi, Budanis Meilani.(2013). Klasifikasi Data Karyawan Untuk Menentukan Jadwal
Kerja
Menggunakan
Metode
Decision
Tree.(online).http://jurnal.itats.ac.id/wp-content/uploads/2013/06/KlasifikasiData-Karyawan-.-.-.-..pdf (diakses 05 mei 2015 pukul 08.00). [3] Cornelia, SKM., M.Sc. et al. (2014). Konseling Gizi, Jakarta:Penerbit Penebar Plus*(Penebar Swadaya Grup). [4] Kusuma dewi, Sri. 2009. Klasifikasi status gizi menggunakan Naïve xiv
ayesian
classification.(online).http://msi.binus.ac.id/files/2013/05/0301-02-Sri-Kusu madewi.pdf (diakses 01 maret 2015 pukul 07:10 pm). [5] Tantra, Dhimas Yudistira. Klasifikasi Status Gizi Orang Dewasa Dengan Algoritma
Naïve
Bayes
(online).
Classification.
http://eprints.dinus.ac.id/13266/1/jurnal_13763.pdf (diakses 04 maret 2015 pukul 03:00 pm). [6] Medicastore.
(2007).
Malnutrisi.
Diakses
Januari
2016,
dari
http://www.medicastore.com/ cybermed/detail_pyk.php?idktg=10&iddtl=628. [7] Sunjana , “Aplikasi Mining Data Mahasiswa Dengan Metode Klasifikasi Decision Tree," Seminar Nasional Aplikasi Teknologi Informasi, pp. Januari 2016. [8] Rahmansyah, Arief . (2014). Getting Started : Weka. Diakses Mei 2016, dari https://ariefrahmansyah.wordpress.com/2014/11/18/getting-started-weka/. [9] Khairina,
Desy.
(2008).
Faktor-faktor
tinjauan.
(online).
http://www.lontar.ui.ac.id/file?file=digital/122525-S%205254-Faktor-faktorTinjauan%20literatur.pdf (diakses 08 juli 2015 pukul 12.39 pm). [10]Charis fauzan, abd. (2015). Penerapan Cross Validation Sebagai Metode Pengujian
Sistem.
Diakses
Juni
2016,
dari
http://www.charisfauzan.net/2015/02/penerapan-cross-validation-sebagai.htm l