본문 바로가기

Study/Lecture - Basic

W3.L3-4. Naive Bayes Classifier - Naive Bayes Classifier

| Introduction

Previously

 

$$ f^*(x) = argmax_{\ Y=y}\ P(X=x \mid Y=y) \cdot P(Y=y) $$

각 X 간 복잡한 Joint 파트 (필요한 Parameter 수가 굉장히 많다.)

 

 

Let's apply the conditional independent assumption

 

$$ f^*(x) \approx argmax_{\ Y=y}\ P(Y=y) \cdot \prod_{i} \ P(X_i=x_i \mid Y=y) $$

$P(X_i=x_i \mid Y=y) $  has  $ (2-1) \cdot d \cdot k $ parameters!

 

 

 

| Naive Bayes Classifier

Given

- Class Prior $ P(Y) $

- $ d $ conditionally independent features $ X $ given the class $Y$ for each $X_i$, we have the likelihood of $P(X_i \mid Y)$

 

$$ f_{NB}(x) = argmax_{\ Y=y}\ P(Y=y) \cdot \prod_{i} \ P(X_i=x_i \mid Y=y) $$

Problem 1: Naive assumption

현실에서 통용되기 어려운 가정

 

Problem 2: Incorrect Probability Esimations

아주 Sparse 한 입력 케이스에 대해 관측하지 못했다... 이 때는 정확하게 동작하기 어려움

MLE 보다는 MAP 를 이용해서 사전정보라도 줘서 계산하는게 좋다.

생각치도 못한 입력에 대해서는 특정 케이스에 대해 확률이 0 이 되기 때문에 Prior 정보를 활용해야 한다.

 

 

 

 

 

Reference
문일철 교수님 강의 
https://www.youtube.com/watch?v=oNTXMgqCv6E&list=PLbhbGI_ppZISMV4tAWHlytBqNq1-lb8bz&index=13