DAFTAR ISI
Hal
HALAMAN JUDUL i
PERSETUJUAN ii
iiiiiiii PERNYATAAN ORISINALITAS
iii PERSETUJUAN PUBLIKASI
iv PANITIA PENGUJI
v RIWAYAT HIDUP
vi UCAPAN TERIMA KASIH
vii ABSTRAK
ix ABSRACT
x DAFTAR ISI
xi DAFTAR TABEL
xiv DAFTAR GAMBAR
xxxxxxxxxxx xv
BAB 1 : PENDAHULUAN
1.1. Latar Belakang 1
1.2. Perumusan Masalah 3
1.3. Batasan Masalah 3
1.4. Tujuan Penelitian 4
1.5. Manfaat Penelitian 4
BAB 2 : TINJAUAN PUSTAKA
2.1. Algoritma Pohon Keputusan 5
2.1.1. Pohon Keputusan ID3 7
2.1.2. Pohon Keputusan C4.5 9
2.2. Algoritma k-Nearest Neighbor k-NN 11
2.3. Data Mining 13
2.4. Jenis Data dalam Data Mining 20
2.5. Teknik Klasifikasi 24
2.6. Pengukuran Akurasi 26
Universita Sumatera Utara
2.7. Riset Terkait 29
2.8. Perbedaan dengan Riset yang Lain 30
2.9. Kontribusi Riset 30
BAB 3 : METODOLOGI PENELITIAN
3.1. Pendahuluan 31
3.2. Data yang Digunakan 31
3.2.1. Data Set BreastCancer 32
3.2.2. Data Set Car 32
3.2.3. Data Set Diabetes 33
3.2.4. Data Set Ionosphere 33
3.2.5. Data Set Iris 33
3.3. Analisis Sistem 34
3.3.1. Pohon Keputusan 34
3.3.2. k-Nearest Neighbor k-NN 36
3.3.3. Metode 10-fold Cross Validation 38
3.3.4. Confusion Matrix 38
3.4. Desain Sistem 40
3.4.1. Aplikasi Training Sets dan Testing Sets 42
3.4.2. Aplikasi Perhitungan Akurasi 44
BAB 4 : HASIL DAN PEMBAHASAN
4.1. Data Set BreastCancer 46
4.2. Data Set Car 48
4.3. Data Set Diabetes 50
4.4. Data Set Ionosphere 52
4.5. Data Set Iris 54
4.6. Analisis Perbandingan Akurasi 57
4.6.1. Penilaian Precision 57
4.6.2. Penilaian Recall 58
4.6.3. Penilaian F-measure 60
4.6.4. Penilaian Success Rate 61
Universita Sumatera Utara
BAB 5 : KESIMPULAN DAN SARAN
5.1. Kesimpulan 63
5.2. Saran 64
DAFTAR PUSTAKA 65
LAMPIRAN 67
Universita Sumatera Utara
DAFTAR TABEL
Nomor Keterangan
Hal 2.1.
Confusion Matrix 28
2.2. Table of Confusion
28 3.1.
Data Sets Penelitian 31
3.2. Informasi Atribut Data Set BreastCancer
32 3.3.
Informasi Atribut Data Set Car 32
3.4. Informasi Atribut Data Set Diabetes
33 3.5.
Informasi Atribut Data Set Iris 34
3.6. Table of Confusion Kelas “tested_negative”
39 3.7.
Table of Confusion Kelas “tested_positive” 39
3.8. Nilai Akurasi berdasarkan Confusion Matrix Diabetes.arff
40 4.1.
Nilai Akurasi Pohon Keputusan terhadap BreastCancer.arff 47
4.2. Nilai Akurasi k-NN terhadap BreastCancer.arff
48 4.3.
Nilai Akurasi Pohon Keputusan terhadap Car.arff 49
4.4. Nilai Akurasi k-NN terhadap Car.arff
50 4.5.
Nilai Akurasi Pohon Keputusan terhadap Diabetes.arff 51
4.6. Nilai Akurasi k-NN terhadap Diabetes.arff
52 4.7.
Nilai Akurasi Pohon Keputusan terhadap Ionosphere.arff 53
4.8. Nilai Akurasi k-NN terhadap Ionosphere.arff
54 4.9.
Nilai Akurasi Pohon Keputusan terhadap Iris.arff 55
4.10. Nilai Akurasi k-NN terhadap Iris.arff
56 4.11.
Perbandingan Precision Pohon Keputusan dan k-NN 57
4.12. Perbandingan Recall Pohon Keputusan dan k-NN
59 4.13.
Perbandingan F-Measure Pohon Keputusan dan k-NN 60
4.14. Perbandingan Success Rate Pohon Keputusan dan k-NN
61
Universita Sumatera Utara
DAFTAR GAMBAR
Nomor Keterangan
Hal 2.1.
Konsep Pohon Keputusan 5
2.2. Struktur Pohon Keputusan
6 2.3.
Pohon Keputusan Sebelum dan Setelah Dipangkas 11
2.4. Ilustrasi Kedekatan Kasus Pasien
12 2.5.
Ilmu Data Mining 16
2.6. Peranan Bidang Ilmu Lain terhadap Data Mining
16 2.7.
Tingkatan Pemanfaatan Data untuk Pengambilan Keputusan 17
2.8. Tahapan KDD pada Data Mining
18 2.9.
Data Cube pada Data Warehouse 22
2.10. Contoh Model Klasifikasi
24 2.11.
Prosedur 5-fold Cross Validation 26
2.12. Hasil Prediksi Kelas
27 3.1.
Diagram Alir Perhitungan Akurasi Pohon Keputusan pada Diabetes.arff 35
3.2. Diagram Alir Perhitungan Akurasi k-NN pada Diabetes.arff
37 3.3.
Metode 10-fold Cross Validation 38
3.4. Confusion Matrix Diabetes.arff
39 3.5.
Interface WEKA 3.7.8 42
3.6. Tahapan Preprocess
43 3.7.
Tahapan Classify 44
3.8. Interface Confusion Matrix for Accuracy
44 4.1.
Perhitungan Akurasi Pohon Keputusan terhadap BreastCancer.arff 46
4.2. Perhitungan Akurasi k-NN terhadap BreastCancer.arff
47 4.3.
Perhitungan Akurasi Pohon Keputusan terhadap Car.arff 48
4.4. Perhitungan Akurasi k-NN terhadap Car.arff
49 4.5.
Perhitungan Akurasi Pohon Keputusan terhadap Diabetes.arff 51
4.6. Perhitungan Akurasi k-NN terhadap Diabetes.arff
52 4.7.
Perhitungan Akurasi Pohon Keputusan terhadap Ionosphere.arff 53
4.8. Perhitungan Akurasi k-NN terhadap Ionosphere.arff
54 4.9.
Perhitungan Akurasi Pohon Keputusan terhadap Iris.arff 55
4.10. Perhitungan Akurasi k-NN terhadap Iris.arff
56 4.11.
Grafik Perbandingan Precision 58
4.12. Grafik Perbandingan Recall
59 4.13.
Grafik Perbandingan F-measure 60
4.14. Grafik Perbandingan Success Rate
62
Universita Sumatera Utara
ABSTRAK
Perkembangan teknologi basis data modern telah memungkinkan ruang penyimpanan yang besar dan hal ini menjadi latar belakang dikembangkannya konsep data mining.
Salah satu fungsi utama data mining adalah fungsi klasifikasi yang digunakan untuk memprediksi kelas dan menghasilkan informasi berdasarkan data historis. Pada fungsi
klasifikasi, terdapat banyak algoritma yang dapat digunakan untuk mengolah input menjadi output yang diinginkan, sehingga harus diperhatikan aspek performance dari
masing-masing algoritma tersebut. Tujuan penelitian ini adalah untuk menganalisis dan membandingkan performance algoritma klasifikasi pohon keputusan C4.5 dan
k-Nearest Neighbor k-NN dari sudut pandang akurasi. Data sets penelitian berasal dari UCI data sets, yaitu BreastCancer, Car, Diabetes, Ionosphere, dan Iris. Adapun
metode evaluasi yang digunakan pada kedua macam algoritma adalah 10-fold cross validation. Hasil evaluasi berupa confusion matrix untuk penilaian precision, recall,
F-measure, dan success rate. Hasil analisis perbandingan akurasi menunjukkan bahwa nilai keakuratan algoritma pohon keputusan lebih baik dengan variasi 2.28 - 2.5
dibandingkan algoritma k-NN pada implementasi terhadap 5 data sets penelitian. Kata Kunci: Klasifikasi, Pohon Keputusan, k-NN, 10-fold Cross Validation,
Confusion Matrix, Akurasi.
Universita Sumatera Utara
ACCURACY ANALYSIS OF DECISION TREE AND K-NEAREST NEIGHBOR k-NN ALGORITHM
ABSTRACT
The development of modern database technology has enabled large space of storage and this concept has become the background of the data mining applications. One of
the main functions of data mining is the classification that is used to predict the class and generate information based on historical data. In the classification, there is a lot of
algorithms that can be used to process the input into the desired output, thus it is very important to observe and measure the performance of each algorithm. The purpose of
this research is to analyze and compare the performance of decision tree C4.5 and k- Nearest Neighbor k-NN algorithm from the point of view of accuracy. Data sets are
derived from UCI data sets, namely BreastCancer, Car, Diabetes, Ionosphere, and Iris. The evaluation method used in both kinds of algorithms is 10-fold cross validation.
Evaluation result for each algorithm is a confusion matrix for measuring the precision, recall, F-measure, and success rate. Comparative analysis of the accuracy showed that
the accuracy of the decision tree algorithm is better by variation of 2.28 - 2.5 compared to k-NN algorithm in the implementation for 5 research data sets.
Keywords: Classification, Decision Tree, k-NN, 10-fold Cross Validation, Confusion Matrix, Accuracy.
Universita Sumatera Utara
BAB 1 PENDAHULUAN