ทำความเข้าใจวิธี Bayesian

Supervised Learning in R: Classification

Brett Lantz

Instructor

การประมาณความน่าจะเป็น

แผนที่ตำแหน่ง

ความน่าจะเป็น ของ A เขียนแทนด้วย P(A)

  • P(work) = 23 / 40 = 57.5%
  • P(store) = 4 / 40 = 10.0%
Supervised Learning in R: Classification

ความน่าจะเป็นร่วมและเหตุการณ์อิสระ

แผนภาพเวนน์

ความน่าจะเป็นร่วม ของเหตุการณ์ A และ B เขียนแทนด้วย P(A and B)

  • P(work and evening) = 1%
  • P(work and afternoon) = 20%
Supervised Learning in R: Classification

ความน่าจะเป็นแบบมีเงื่อนไขและเหตุการณ์ที่ขึ้นต่อกัน

แผนภาพเวนน์

ความน่าจะเป็นแบบมีเงื่อนไข ของเหตุการณ์ A และ B เขียนแทนด้วย P(A | B)

  • P(A | B) = P(A and B) / P(B)
  • P(work | evening) = 1 / 25 = 4%
  • P(work | afternoon) = 20 / 25 = 80%
Supervised Learning in R: Classification

การทำนายด้วย Naive Bayes

# building a Naive Bayes model
library(naivebayes)
m <- naive_bayes(location ~ time_of_day, data = location_history)
# making predictions with Naive Bayes
future_location <- predict(m, future_conditions)
Supervised Learning in R: Classification

มาฝึกกันเถอะ!

Supervised Learning in R: Classification

Preparing Video For Download...