=0.9 ×max{0, 0.7)}=0.63
(5) 最后对CF1(H )和CF2(H)进行合成,求出CF(H) CF(H)= CF1(H)+CF2(H)+ CF1(H) × CF2(H) =0.692
6.10 设有如下推理规则
r1: IF E1 THEN (2, 0.00001) H1 r2: IF E2 THEN (100, 0.0001) H1 r3: IF E3 THEN (200, 0.001) H2 r4: IF H1 THEN (50, 0.1) H2
且已知P(E1)= P(E2)= P(H3)=0.6, P(H1)=0.091, P(H2)=0.01, 又由用户告知: P(E1| S1)=0.84, P(E2|S2)=0.68, P(E3|S3)=0.36 请用主观Bayes方法求P(H2|S1, S2, S3)=? 解:(1) 由r1计算O(H1| S1)
先把H1的先验概率更新为在E1下的后验概率P(H1| E1) P(H1| E1)=(LS1 × P(H1)) / ((LS1-1) × P(H1)+1) =(2 × 0.091) / ((2 -1) × 0.091 +1) =0.16682
由于P(E1|S1)=0.84 > P(E1),使用P(H | S)公式的后半部分,得到在当前观察S1下的后验概率P(H1| S1)和后验几率O(H1| S1)
P(H1| S1) = P(H1) + ((P(H1| E1) – P(H1)) / (1 - P(E1))) × (P(E1| S1) – P(E1)) = 0.091 + (0.16682 –0.091) / (1 – 0.6)) × (0.84 – 0.6) =0.091 + 0.18955 × 0.24 = 0.136492 O(H1| S1) = P(H1| S1) / (1 - P(H1| S1)) = 0.15807 (2) 由r2计算O(H1| S2)
先把H1的先验概率更新为在E2下的后验概率P(H1| E2) P(H1| E2)=(LS2 × P(H1)) / ((LS2-1) × P(H1)+1) =(100 × 0.091) / ((100 -1) × 0.091 +1) =0.90918
由于P(E2|S2)=0.68 > P(E2),使用P(H | S)公式的后半部分,得到在当前观察S2下的后验概率P(H1| S2)和后验几率O(H1| S2)
P(H1| S2) = P(H1) + ((P(H1| E2) – P(H1)) / (1 - P(E2))) × (P(E2| S2) – P(E2)) = 0.091 + (0.90918 –0.091) / (1 – 0.6)) × (0.68 – 0.6) =0.25464
O(H1| S2) = P(H1| S2) / (1 - P(H1| S2)) =0.34163
(3) 计算O(H1| S1,S2)和P(H1| S1,S2) 先将H1的先验概率转换为先验几率
O(H1) = P(H1) / (1 - P(H1)) = 0.091/(1-0.091)=0.10011
再根据合成公式计算H1的后验几率
O(H1| S1,S2)= (O(H1| S1) / O(H1)) × (O(H1| S2) / O(H1)) × O(H1) = (0.15807 / 0.10011) × (0.34163) / 0.10011) × 0.10011 = 0.53942
再将该后验几率转换为后验概率
P(H1| S1,S2) = O(H1| S1,S2) / (1+ O(H1| S1,S2)) = 0.35040 (4) 由r3计算O(H2| S3)
先把H2的先验概率更新为在E3下的后验概率P(H2| E3) P(H2| E3)=(LS3 × P(H2)) / ((LS3-1) × P(H2)+1) =(200 × 0.01) / ((200 -1) × 0.01 +1) =0.09569
由于P(E3|S3)=0.36 < P(E3),使用P(H | S)公式的前半部分,得到在当前观察S3下的后验概率P(H2| S3)和后验几率O(H2| S3)
P(H2| S3) = P(H2 | ? E3) + (P(H2) – P(H2| ?E3)) / P(E3)) × P(E3| S3) 由当E3肯定不存在时有
P(H2 | ? E3) = LN3 × P(H2) / ((LN3-1) × P(H2) +1) = 0.001 × 0.01 / ((0.001 - 1) × 0.01 + 1) = 0.00001 因此有
P(H2| S3) = P(H2 | ? E3) + (P(H2) – P(H2| ?E3)) / P(E3)) × P(E3| S3) =0.00001+((0.01-0.00001) / 0.6) × 0.36 =0.00600
O(H2| S3) = P(H2| S3) / (1 - P(H2| S3))
=0.00604
(5) 由r4计算O(H2| H1)
先把H2的先验概率更新为在H1下的后验概率P(H2| H1) P(H2| H1)=(LS4 × P(H2)) / ((LS4-1) × P(H2)+1) =(50 × 0.01) / ((50 -1) × 0.01 +1) =0.33557
由于P(H1| S1,S2)=0.35040 > P(H1),使用P(H | S)公式的后半部分,得到在当前观察S1,S2下H2的后验概率P(H2| S1,S2)和后验几率O(H2| S1,S2)
P(H2| S1,S2) = P(H2) + ((P(H2| H1) – P(H2)) / (1 - P(H1))) × (P(H1| S1,S2) – P(H1)) = 0.01 + (0.33557 –0.01) / (1 – 0.091)) × (0.35040 – 0.091) =0.10291
O(H2| S1,S2) = P(H2| S1, S2) / (1 - P(H2| S1, S2)) =0.10291/ (1 - 0.10291) = 0.11472 (6) 计算O(H2| S1,S2,S3)和P(H2| S1,S2,S3) 先将H2的先验概率转换为先验几率
O(H2) = P(H2) / (1 - P(H2) )= 0.01 / (1-0.01)=0.01010
再根据合成公式计算H1的后验几率
O(H2| S1,S2,S3)= (O(H2| S1,S2) / O(H2)) × (O(H2| S3) / O(H2)) ×O(H2) = (0.11472 / 0.01010) × (0.00604) / 0.01010) × 0.01010 =0.06832
再将该后验几率转换为后验概率
P(H2| S1,S2,S3) = O(H1| S1,S2,S3) / (1+ O(H1| S1,S2,S3)) = 0.06832 / (1+ 0.06832) = 0.06395
可见,H2原来的概率是0.01,经过上述推理后得到的后验概率是0.06395,它相当于先