Bayesian Classification

Metode Bayesian
(Studi Kasus : Prediksi)

Jika terdapat sebuah tabel berisi data permainan tenis seperti berikut :

dan kondisi cuaca saat itu (Datum) adalah :
- Outlook : Sunny
- Temperature : Cool
- Humidity : High
- Wind : Strong
Pertanyaan : apakah seseorang tersebut akan bermain tenis? (Yes atau No)

Jawaban :
Rumus Bayesian : P(h | d) = [P(d | h) . P(h)] / P(d)

  1. Menghitung probabilitas "Sunny & Play" :
    • P(Sunny | Play) = P(Sunny ∩ Play) / P(Play) = 2 / 9 = 0.22
  2. Menghitung probabilitas "Sunny & Not Play" :
    • P(Sunny | -Play) = P(Sunny ∩ -Play) / P(-Play) = 3 / 5 = 0.6
  3. Menghitung probabilitas "Cool & Play" :
    • P(Cool | Play) = P(Cool ∩ Play) / P(Play) = 3 / 9 = 0.33
  4. Menghitung probabilitas "Cool & Not Play" :
    • P(Cool | -Play) = P(Cool ∩ -Play) / P(-Play) = 1 / 5 = 0.2
  5. Menghitung probabilitas "High & Play" :
    • P(High | Play) = P(High ∩ Play) / P(Play) = 3 / 9 = 0.33
  6. Menghitung probabilitas "High & Not Play" :
    • P(High | -Play) = P(High ∩ -Play) / P(-Play) = 4 / 5 = 0.8
  7. Menghitung probabilitas "Strong & Play" :
    • P(Strong | Play) = P(Strong ∩ Play) / P(Play) = 3 / 9 = 0.33
  8. Menghitung probabilitas "Strong & Not Play" :
    • P(Strong | -Play) = P(Strong ∩ -Play) / P(-Play) = 3 / 5 = 0.6
  9. Menghitung probabilitas "Play" :
    • P(Play) = 9 / 14 = 0.64
  10. Menghitung probabilitas "Not Play" :
    • P(-Play) = 5 / 14 = 0.35
  11. Menghitung probabilitas "Sunny, Cool, High, Strong & Play" :
    • P(Sunny, Cool, High, Strong | Play) = 0.22 x 0.33 x 0.33 x 0.33 x 0.64 = 0.005
  12. Menghitung probabilitas "Sunny, Cool, High, Strong & Not Play" :
    • P(Sunny, Cool, High, Strong | -Play) = 0.6 x 0.2 x 0.8 x 0.6 x 0.35 = 0.02

Kesimpulan : 
Karena nilai probabilitas P(Sunny, Cool, High, Strong | -Play) > P(Sunny, Cool, High, Strong | Play), maka hasilnya adalah "No" atau orang tersebut tidak bermain tenis (Not Play)

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comments:

Post a Comment

UNIVERSITAS TRISAKTI - Takwa Tekun Terampil - Asah Asih Asuh - Setia Satria Sportif

Total Pageviews