베이즈 방법 이해하기

R로 배우는 Supervised Learning: 분류

Brett Lantz

Instructor

확률 추정

위치 지도

A의 확률은 P(A)로 표기합니다

  • P(직장) = 23 / 40 = 57.5%
  • P(상점) = 4 / 40 = 10.0%
R로 배우는 Supervised Learning: 분류

결합 확률과 독립 사건

벤 다이어그램

사건 A와 B의 결합 확률은 P(A and B)로 표기합니다

  • P(직장 and 저녁) = 1%
  • P(직장 and 오후) = 20%
R로 배우는 Supervised Learning: 분류

조건부 확률과 종속 사건

벤 다이어그램

사건 A와 B의 조건부 확률은 P(A | B)로 표기합니다

  • P(A | B) = P(A and B) / P(B)
  • P(직장 | 저녁) = 1 / 25 = 4%
  • P(직장 | 오후) = 20 / 25 = 80%
R로 배우는 Supervised Learning: 분류

나이브 베이즈로 예측하기

# 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)
R로 배우는 Supervised Learning: 분류

연습해 봅시다!

R로 배우는 Supervised Learning: 분류

Preparing Video For Download...