우리가 이제 새로운 instance가 들어왔을때, 어떻게 분류를 하는것이 최적일지 생각해 보아야 한다.
이전처럼 단순히 hMAP 으로 아래의 예제를 생각해보자.
Example. Classifying ⊕ and ⊖ by simply applying the MAP hypothesis
Given a new instance x
h1(x)=⊕,h2(x)=⊖,h3(x)=⊕
Three possible h:
P(h1∣D)=0.4,P(h2∣D)=0.3,P(h3∣D)=0.3,
If we simply apply the hMAP=h∈HargmaxP(h∣D), then we have the most probable classification of x as
hMAP=h1,hence x=⊕
그러나 이렇게 단순히 hMAP 을 구하면 뭔가 이상함을 느낄것이다.
따라서 이렇게 계산하는것이 아닌, 다음처럼 생각해보자.
- new example can take on any value vj from some set V then the prob P(vj∣D) that correct classification for the new instance is vj
P(vj∣D)=hi∈H∑P(vj∣hi)P(hi∣D)
Bayes Optimal Classification
vj∈Vargmax∑hi∈HP(vj∣hi)P(hi∣D)
이를 가지고 위의 예제를 다시 살펴보자.
Example. Classifying ⊕ and ⊖ (revisited)
The set of possible classification of the new instance is V={⊕,⊖}, and
P(h1∣D)=0.4,P(⊖∣h1)=0,P(⊕∣h1)=1P(h2∣D)=0.4,P(⊖∣h2)=1,P(⊕∣h2)=0P(h3∣D)=0.4,P(⊖∣h3)=1,P(⊕∣h3)=0
therefore
hi∈H∑P(⊕∣hi)P(hi∣D)=0.4hi∈H∑P(⊖∣hi)P(hi∣D)=0.6
consequently,
vj∈{⊕,⊖}argmaxhi∈H∑P(vj∣hi)P(hi∣D)=⊖
그러나 몇가지의 문제가 존재한다.
- It is quite computationally costly to apply
- It compute the posterior porb for every hypothesis in H and then combines predictions of each hypothesis to classify