Presentasi sedang didownload. Silahkan tunggu

Presentasi sedang didownload. Silahkan tunggu

Decision Tree Classification.

Presentasi serupa


Presentasi berjudul: "Decision Tree Classification."— Transcript presentasi:

1 Decision Tree Classification

2 Decision Tree Proses pada Decision Tree adalah mengubah bentuk data (tabel) menjadi bentuk Tree, Mengubah Tree menjadi Rule, dan menyederhanakan rule(basuki&syarif,2003)

3 Decision Tree Metode Decision Tree mengubah fakta yang sangat besar menjadi decision Tree yang merepresentasikan aturan. Sebuah Decision Tree adalah struktur yang dapat digunakan untuk membagi data yang besar menjadi himpunan-himpunan record yang lebih kecil dengan menerapkan serangkaian aturan keputusan. (Berry & Linoff)

4 Decision Tree Algoritma yang digunakan untuk pembentukan Decision Tree diantaranya: ID3,CART,C4.5 Algoritma C4.5 merupakan pengembangan dari ID3

5 Contoh kasus 1 2 3 4 5 6 7 8 9 10 11 12 13 14 NO OUTLOOK TEMPERATUR
HUMIDITY WINDY PLAY 1 Sunny Hot High FALSE 2 TRUE 3 Cloudy YES 4 Rainy Mild 5 Cool Normal 6 7 8 9 10 11 12 13 14

6 Algoritma C4.5 Pilih atribut sebagai akar
Buat cabang untuk tiap-tiap nilai Bagi kasus dalam cabang Ulangi proses untuk setiap cabang sampai semua kasus pada cabang memiliki kelas yang sama

7 Gain n Gain(S,A)=Entropy(S) - ∑ |Si| * Entropy(Si) i=1 |S|
S: Himpunan kasus A: Atribut n : jml partisi atribut a |Si| : jml kasus pada partisi ke-I |S| : jml kasus dlm S

8 Entropy n Entropy(S)= ∑ - pi * log2 pi i=1 S : himpunan kasus
n: jml partisi S Pi= proporsi dari Si terhadap S

9 Meringkas JML Kasus 1 2 3 4 5 6 7 8 9 10 11 12 13 14 NO OUTLOOK
TEMPERATUR HUMIDITY WINDY PLAY 1 Sunny Hot High FALSE 2 TRUE 3 Cloudy YES 4 Rainy Mild 5 Cool Normal 6 7 8 9 10 11 12 13 14 JML NO YES Kasus TOTAL OUTLOOK Cloudy Rainy Sunny TEMPERATUR Cool Hot Mild HUMIDITY High Normal WINDY FALSE TRUE

10 Menghitung Entropy Total
Node1 Node JML NO YES Entropy Gain Kasus 1 TOTAL 14 4 10   OUTLOOK Cloudy Rainy 5 Sunny 3 2 TEMPERATUR Cool Hot Mild 6 HUMIDITY High 7 Normal WINDY FALSE 8 TRUE n Entropy(S)= ∑ - pi * log2 pi i=1 Entropy(Total)=(-4/14*log2(4/14))+ (-10/14 * log2(10/14)) Entropy(Total)=

11 Menghitung Gain n Gain(S,A)=Entropy(S) - ∑ |Si| * Entropy(Si) i=1 |S|
Node JML NO YES Entropy Gain Kasus 1 TOTAL 14 4 10 OUTLOOK Cloudy Rainy 5 Sunny 3 2 TEMPERATUR Cool Hot Mild 6 HUMIDITY High 7 Normal WINDY FALSE 8 TRUE n Gain(S,A)=Entropy(S) - ∑ |Si| * Entropy(Si) i=1 |S| Gain(Total,OutLook)= Entropy(Total) – n ∑ |OutLook| * Entropy(OutLook) i=1 |Total| Gain(Total,OutLook)= – ((4/14*0)+(5/14*0.722)+(5/14*0.97)) Gain(Total,OutLook)=

12 Memilih Atribut sebagai Akar
Node JML NO YES Entropy Gain Kasus 1 TOTAL 14 4 10 OUTLOOK Cloudy Rainy 5 Sunny 3 2 TEMPERATUR Cool Hot Mild 6 HUMIDITY High 7 Normal WINDY FALSE 8 TRUE 1 HUMIDITY Normal High 1.1 YES

13 3 12 4 14 1 2 8 7 13 5 6 10 9 11 NO OUTLOOK TEMPERATUR HUMIDITY WINDY
PLAY 3 Cloudy Hot High FALSE YES 12 Mild TRUE 4 Rainy 14 1 Sunny 2 8 7 Cool Normal 13 5 6 10 9 11

14 Memilih Atribut sebagai Node 1.1
JML NO YES Entropy Gain Kasus 1.1 HUMIDITY-HIGH 7 4 3 OUTLOOK Cloudy 2 Rainy 1 Sunny TEMPERATUR Cool Hot Mild WINDY FALSE TRUE 1 HUMIDITY High Normal 1.1 OUTLOOK YES Sunny Cloudy Rainy YES 1.1.2 NO

15 Memilih Atribut sebagai Node 1.1.2
HUMIDITY Node JML NO YES Entropy Gain Kasus 1.1.2 HUMIDITY-HIGH &OUTLOOK RAINY 2 1 TEMPERATUR Cool Hot Mild WINDY FALSE TRUE High Normal 1.1 OUTLOOK YES Sunny Cloudy YES 1.1.2 WINDY NO False True YES NO


Download ppt "Decision Tree Classification."

Presentasi serupa


Iklan oleh Google