TOTO HARYANTO | Naive BayesCopyright Toto Haryanto [email protected]://totoharyanto.staff.ipb.ac.id/2012/03/27/naive-bayes/
Naive Bayes
Sambil Mengingat Kembali Tentang Naive bayes. Berikut contoh proses pengambilan keputusa dengan Naive Bayes.
1. Diketahui Data Training Sebagai berikut:
ID X1 X2 X3 Class
1 Yes Single 125 No
2 No Married 100 No
3 No Single 70 No
4 Yes Married 120 No
5 No Divorce 95 Yes
6 No Married 60 No
page 1 / 26
TOTO HARYANTO | Naive BayesCopyright Toto Haryanto [email protected]://totoharyanto.staff.ipb.ac.id/2012/03/27/naive-bayes/
page 2 / 26
TOTO HARYANTO | Naive BayesCopyright Toto Haryanto [email protected]://totoharyanto.staff.ipb.ac.id/2012/03/27/naive-bayes/
7
page 3 / 26
TOTO HARYANTO | Naive BayesCopyright Toto Haryanto [email protected]://totoharyanto.staff.ipb.ac.id/2012/03/27/naive-bayes/
Yes
page 4 / 26
TOTO HARYANTO | Naive BayesCopyright Toto Haryanto [email protected]://totoharyanto.staff.ipb.ac.id/2012/03/27/naive-bayes/
Divorce
page 5 / 26
TOTO HARYANTO | Naive BayesCopyright Toto Haryanto [email protected]://totoharyanto.staff.ipb.ac.id/2012/03/27/naive-bayes/
220
page 6 / 26
TOTO HARYANTO | Naive BayesCopyright Toto Haryanto [email protected]://totoharyanto.staff.ipb.ac.id/2012/03/27/naive-bayes/
No
page 7 / 26
TOTO HARYANTO | Naive BayesCopyright Toto Haryanto [email protected]://totoharyanto.staff.ipb.ac.id/2012/03/27/naive-bayes/
8
page 8 / 26
TOTO HARYANTO | Naive BayesCopyright Toto Haryanto [email protected]://totoharyanto.staff.ipb.ac.id/2012/03/27/naive-bayes/
No
page 9 / 26
TOTO HARYANTO | Naive BayesCopyright Toto Haryanto [email protected]://totoharyanto.staff.ipb.ac.id/2012/03/27/naive-bayes/
Single
page 10 / 26
TOTO HARYANTO | Naive BayesCopyright Toto Haryanto [email protected]://totoharyanto.staff.ipb.ac.id/2012/03/27/naive-bayes/
85
page 11 / 26
TOTO HARYANTO | Naive BayesCopyright Toto Haryanto [email protected]://totoharyanto.staff.ipb.ac.id/2012/03/27/naive-bayes/
Yes
page 12 / 26
TOTO HARYANTO | Naive BayesCopyright Toto Haryanto [email protected]://totoharyanto.staff.ipb.ac.id/2012/03/27/naive-bayes/
9
page 13 / 26
TOTO HARYANTO | Naive BayesCopyright Toto Haryanto [email protected]://totoharyanto.staff.ipb.ac.id/2012/03/27/naive-bayes/
No
page 14 / 26
TOTO HARYANTO | Naive BayesCopyright Toto Haryanto [email protected]://totoharyanto.staff.ipb.ac.id/2012/03/27/naive-bayes/
Married
page 15 / 26
TOTO HARYANTO | Naive BayesCopyright Toto Haryanto [email protected]://totoharyanto.staff.ipb.ac.id/2012/03/27/naive-bayes/
75
page 16 / 26
TOTO HARYANTO | Naive BayesCopyright Toto Haryanto [email protected]://totoharyanto.staff.ipb.ac.id/2012/03/27/naive-bayes/
No
page 17 / 26
TOTO HARYANTO | Naive BayesCopyright Toto Haryanto [email protected]://totoharyanto.staff.ipb.ac.id/2012/03/27/naive-bayes/
10
page 18 / 26
TOTO HARYANTO | Naive BayesCopyright Toto Haryanto [email protected]://totoharyanto.staff.ipb.ac.id/2012/03/27/naive-bayes/
No
page 19 / 26
TOTO HARYANTO | Naive BayesCopyright Toto Haryanto [email protected]://totoharyanto.staff.ipb.ac.id/2012/03/27/naive-bayes/
Single
page 20 / 26
TOTO HARYANTO | Naive BayesCopyright Toto Haryanto [email protected]://totoharyanto.staff.ipb.ac.id/2012/03/27/naive-bayes/
90
page 21 / 26
TOTO HARYANTO | Naive BayesCopyright Toto Haryanto [email protected]://totoharyanto.staff.ipb.ac.id/2012/03/27/naive-bayes/
Yes
page 22 / 26
Dengan, menggunakan Naive Bayes, tentukan X(X1=No,X2=Married,X3=120) ?
jawab:
P(Y=Yes) = 3/10, P(Y=No) = 7/10
P(X1=No|Y=Yes) = 3/3 = 1
P(X1=No|Y=No) = 4/7
TOTO HARYANTO | Naive BayesCopyright Toto Haryanto [email protected]://totoharyanto.staff.ipb.ac.id/2012/03/27/naive-bayes/
P(X2=Married|Y=Yes) = 0/3
P(X2=Married|Y=No) = 4/7
P(X3=120|Y=Yes) = 0/3
P(X3=120|Y=No) = 1/7
P (X1=No,X2=Married,X3=120|Y=Yes) :
= {P(P(X1=No|Y=Yes).P(X2=Married|Y=Yes).P(X3=120|Y=Yes).P(Y=Yes)}
= {(1) .(0/3) .(0/3) .(3/10)}
= 0
page 23 / 26
TOTO HARYANTO | Naive BayesCopyright Toto Haryanto [email protected]://totoharyanto.staff.ipb.ac.id/2012/03/27/naive-bayes/
P (X1=No,X2=Married,X3=120|Y=No) :
= {P(P(X1=No|Y=No).P(X2=Married|Y=No).P(X3=120|Y=No).P(Y=No)}
= {(4/7) .(4/7) .(1/7)
.(7/10)}
= 0,032
Sehingga Keputusannya adalah No
page 24 / 26
TOTO HARYANTO | Naive BayesCopyright Toto Haryanto [email protected]://totoharyanto.staff.ipb.ac.id/2012/03/27/naive-bayes/
Silahkan Mencoba Jika : X(X1=Yes,X2=Divorce,X3=85) ?
Kirim jawaban Anda melalui blog ini...
page 25 / 26
TOTO HARYANTO | Naive BayesCopyright Toto Haryanto [email protected]://totoharyanto.staff.ipb.ac.id/2012/03/27/naive-bayes/
Selamat Mencoba....:-)
page 26 / 26
Top Related