Bayes Theorem and Concept Learning
이제 베이즈 정리와 concept learning간에 어떤 관계가 있을지 생각해보자.
Brute-Force Bayes Concept Learning
instance <x1,⋯,xm>이 있고, training data D를 D=<d1,⋯,dm> 이라 해보자.
Brute-Force MAP Learning
- For each hypothesis h in H, calculate the posterior prob
P(h∣D)=P(D)P(D∣h)P(h)
2. Output the hypothesis hMAP with the highest posterior prob
hMAP=h∈HargmaxP(h∣D)
그러나, 이는 사실상 계산이 불가능하다. 예전의 enjoysports의 경우만 생각하더라도 무려 5120개의 h가 있다고 한다.
따라서, 브루트포스 방법을 사용하려면 P(h)와 P(D∣h)를 specify해야 한다.
그렇다면 어떻게 P(h)와 P(D∣h)를 specify해야 할까?
먼저, 문제를 쉽게 생각하기 위해 다음과 같은 3가지 가정을 해보자
- training data D is noise free, di=c(xi) where c:X→{0,1}
- target concept c is contained in hypothesis space H
- believe that any h is more probable than any other → uniform
이 3가정을 통해, 먼저 P(h)를 specify해보자
⇒P(h)=∣H∣1
즉, uniform distribution을 만든다.
P(D∣h) 는 다음처럼 specify 한다.
P(D∣h)={1,0, if di=h(xi) for all di in D otherwise
그렇다면 두가지 경우가 있을 수 있다
-
h is inconsistent with D
P(h∣D)=P(D)P(D∣h)P(h)=P(D)0⋅P(h)=0
-
h is consistent with D
p(h∣D)=P(D)P(D∣h)P(h)=P(D)1⋅∣H∣1=∣H∣∣VSH,D∣1⋅∣H∣1=∣VSH,D∣1
즉, 최종적으로 다음처럼 표현이 가능해진다.
p(h∣D)={VSH,D1,0, if h is consistent with D otherwise
Remark
1. every consistent h has posterior prob ∣VSH,D∣1
2. every consistent h is a MAP hypothesis!