本文主要摘选自参考文献 Varshney P K. Distributed Detection and Data Fusion[M]. 1997.(section 2.2)
我们考虑简单的二元假设检验问题。二元假设分别为
H
0
H_0
H0以及
H
1
H_1
H1。用
y
y
y表示观测变量,可以得到条件概率密度函数为
p
(
y
∣
H
i
)
,
i
=
0
,
1
p(y|H_i),\ i=0,1
p(y∣Hi), i=0,1。两种假设的先验概率分别为
P
0
P_0
P0和
P
1
P_1
P1。显然,一共有四种可能的检测结果,其中两种为正确判决,两种为错误判决。下面我们为每种情况分配代价,即用
C
i
j
,
i
,
j
=
0
,
1
C_{ij},\ i,j=0,1
Cij, i,j=0,1来表示
H
j
H_j
Hj情况下判决为
H
i
H_i
Hi的代价。在贝叶斯公式中,判决规则为最小化平均代价。这里的平均代价,或者贝叶斯风险函数,用
R
\mathcal R
R表示,定义为
(1)
R
=
∑
i
=
0
1
∑
j
=
0
1
C
i
j
P
j
P
(
H
i
∣
H
j
)
=
∑
i
=
0
1
∑
j
=
0
1
C
i
j
P
j
∫
Z
i
p
(
y
∣
H
j
)
d
y
,
\tag{1} \begin{aligned} {\mathcal R}&=\sum_{i=0}^{1}\sum_{j=0}^{1}C_{ij}P_jP(H_i|H_j)\\ &=\sum_{i=0}^{1}\sum_{j=0}^{1}C_{ij}P_j\int_{Z_i}p(y|H_j)dy, \end{aligned}
R=i=0∑1j=0∑1CijPjP(Hi∣Hj)=i=0∑1j=0∑1CijPj∫Zip(y∣Hj)dy,(1)其中,
Z
i
Z_i
Zi为
H
i
H_i
Hi的判决域。进一步,我们假定
Z
Z
Z为总的观测空间,则
(2)
R
=
P
0
C
00
∫
Z
0
p
(
y
∣
H
0
)
d
y
+
P
0
C
10
∫
Z
−
Z
0
p
(
y
∣
H
0
)
d
y
+
P
1
C
01
∫
Z
0
p
(
y
∣
H
1
)
d
y
+
P
1
C
11
∫
Z
−
Z
0
p
(
y
∣
H
1
)
d
y
.
\tag{2} \begin{aligned} {\mathcal R}=&P_0C_{00}\int_{Z_0}p(y|H_0)dy+P_0C_{10}\int_{Z-Z_0}p(y|H_0)dy\\ &+P_1C_{01}\int_{Z_0}p(y|H_1)dy+P_1C_{11}\int_{Z-Z_0}p(y|H_1)dy. \end{aligned}
R=P0C00∫Z0p(y∣H0)dy+P0C10∫Z−Z0p(y∣H0)dy+P1C01∫Z0p(y∣H1)dy+P1C11∫Z−Z0p(y∣H1)dy.(2)注意到
∫
Z
p
(
y
∣
H
j
)
d
y
=
1
,
j
=
0
,
1
\int_Zp(y|H_j)dy=1,\ j=0,1
∫Zp(y∣Hj)dy=1, j=0,1我们对(2)进行整理,可以得到
(3)
R
=
P
0
C
10
+
P
1
C
11
+
∫
Z
0
{
P
1
(
C
01
−
C
11
)
p
(
y
∣
H
1
)
−
P
0
(
C
10
−
C
00
)
p
(
y
∣
H
0
)
}
d
y
.
\tag{3} \begin{aligned} {\mathcal R}=&\quad P_0C_{10}+P_1C_{11}\\&+\int_{Z_0}\left\{P_1(C_{01}-C_{11})p(y|H_1) -P_0(C_{10}-C_{00})p(y|H_0)\right\}dy. \end{aligned}
R=P0C10+P1C11+∫Z0{P1(C01−C11)p(y∣H1)−P0(C10−C00)p(y∣H0)}dy.(3)前面两项为固定值。通过将
Z
Z
Z中的点分配到
Z
0
Z_0
Z0中,从而使得(3)中的积分式为负值,可以最小化风险
R
\mathcal R
R。假定
C
10
>
C
00
C_{10}>C_{00}
C10>C00,
C
01
>
C
11
C_{01}>C_{11}
C01>C11,最小化后的结果为似然概率比检验(likelihood ratio test, LRT)
(4)
p
(
y
∣
H
1
)
p
(
y
∣
H
0
)
H
1
>
<
H
0
P
0
(
C
10
−
C
00
)
P
1
(
C
01
−
C
11
)
,
\tag{4} \begin{aligned} \frac{p(y|H_1)}{p(y|H_0)}\begin{aligned}H_1\\>\\<\\H_0\end{aligned}\frac{P_0(C_{10}-C_{00})}{P_1(C_{01}-C_{11})}, \end{aligned}
p(y∣H0)p(y∣H1)H1><H0P1(C01−C11)P0(C10−C00),(4)进一步可以表示为
(5)
Λ
(
y
)
H
1
>
<
H
0
η
,
\tag{5} \Lambda(y)\begin{aligned}H_1\\>\\<\\H_0\end{aligned}\ \eta,
Λ(y)H1><H0 η,(5)其中
Λ
(
y
)
=
p
(
y
∣
H
1
)
p
(
y
∣
H
0
)
\Lambda(y)=\frac{p(y|H_1)}{p(y|H_0)}
Λ(y)=p(y∣H0)p(y∣H1)为似然比,
η
=
P
0
(
C
10
−
C
00
)
P
1
(
C
01
−
C
11
)
\eta=\frac{P_0(C_{10}-C_{00})}{P_1(C_{01}-C_{11})}
η=P1(C01−C11)P0(C10−C00)为门限;等效地,我们有对数形式
(6)
log
Λ
(
y
)
H
1
>
<
H
0
log
η
.
\tag{6} \log \Lambda(y)\begin{aligned}H_1\\>\\<\\H_0\end{aligned}\ \log\eta.
logΛ(y)H1><H0 logη.(6)
对于特殊情况 C 00 = C 11 = 0 C_{00}=C_{11}=0 C00=C11=0, C 01 > C 10 = 1 C_{01}>C_{10}=1 C01>C10=1,正确判决的代价为0,而错误判决的代价为1,此时
(7) R = P 0 ∫ Z 1 p ( y ∣ H 0 ) d y + P 1 ∫ Z 0 p ( y ∣ H 1 ) d y \tag{7} {\mathcal R}=P_0\int_{Z_1}p(y|H_0)dy+P_1\int_{Z_0}p(y|H_1)dy R=P0∫Z1p(y∣H0)dy+P1∫Z0p(y∣H1)dy(7)正好是平均错误概率。此时,贝叶斯检验就是最小化平均错误概率,判决门限 η = P 0 P 1 \eta=\frac{P_0}{P_1} η=P1P0。如果 P 0 = P 1 P_0=P_1 P0=P1,则 η = 1 \eta=1 η=1, log η = 0 \log \eta =0 logη=0,在通信系统中称为最小误差接收机。
下面我们定义虚检概率及误检分别为
(8)
P
F
=
P
(
H
1
∣
H
0
)
=
∫
Z
1
p
(
y
∣
H
0
)
d
y
,
\tag{8} P_F=P(H_1|H_0)=\int_{Z_1}p(y|H_0)dy,
PF=P(H1∣H0)=∫Z1p(y∣H0)dy,(8)以及
(9)
P
M
=
P
(
H
0
∣
H
1
)
=
∫
Z
0
p
(
y
∣
H
1
)
d
y
,
\tag{9} P_M=P(H_0|H_1)=\int_{Z_0}p(y|H_1)dy,
PM=P(H0∣H1)=∫Z0p(y∣H1)dy,(9)则检测概率为
(10)
P
D
=
1
−
P
F
=
P
(
H
1
∣
H
1
)
=
∫
Z
1
p
(
y
∣
H
1
)
d
y
,
\tag{10} P_D=1-P_F=P(H_1|H_1)=\int_{Z_1}p(y|H_1)dy,
PD=1−PF=P(H1∣H1)=∫Z1p(y∣H1)dy,(10)因此可以将贝叶斯风险函数表示为
(11)
R
=
P
0
C
10
+
P
1
C
11
+
P
1
(
C
01
−
C
11
)
P
M
−
P
0
(
C
10
−
C
00
)
(
1
−
P
F
)
,
\tag{11} {\mathcal R}=P_0C_{10}+P_1C_{11}+P_1(C_{01}-C_{11})P_M-P_0(C_{10}-C_{00})(1-P_F),
R=P0C10+P1C11+P1(C01−C11)PM−P0(C10−C00)(1−PF),(11)考虑到
P
0
=
1
−
P
1
P_0=1-P_1
P0=1−P1,有
(12)
R
=
C
00
(
1
−
P
F
)
+
C
10
P
F
+
P
1
[
(
C
11
−
C
00
)
+
(
C
01
−
C
11
)
P
M
−
(
C
10
−
C
00
)
P
F
]
.
\tag{12} \begin{aligned} {\mathcal R}=&C_{00}(1-P_F)+C_{10}P_F\\ &\quad +P_1[(C_{11}-C_{00})+(C_{01}-C_{11})P_M-(C_{10}-C_{00})P_F]. \end{aligned}
R=C00(1−PF)+C10PF+P1[(C11−C00)+(C01−C11)PM−(C10−C00)PF].(12)根据最优判决区域替代
P
F
P_F
PF和
P
M
P_M
PM的值,可以最小化
R
\mathcal R
R。下面我们采用另外的方法来最小化
R
\mathcal R
R。
根据贝叶斯准则
(13)
P
j
p
(
y
∣
H
j
)
=
P
(
H
j
∣
y
)
p
(
y
)
,
\tag{13} P_jp(y|H_j)=P(H_j|y)p(y),
Pjp(y∣Hj)=P(Hj∣y)p(y),(13)其中,
y
y
y的概率密度函数为
(16)
p
(
y
)
=
P
0
p
(
y
∣
H
0
)
+
P
1
p
(
y
∣
H
1
)
.
\tag{16} p(y)=P_0p(y|H_0)+P_1p(y|H_1).
p(y)=P0p(y∣H0)+P1p(y∣H1).(16)我们可以把(1)表示为
(17)
R
=
∑
i
=
0
1
∑
j
=
0
1
C
i
j
∫
Z
i
P
(
H
j
∣
y
)
p
(
y
)
d
y
,
\tag{17} {\mathcal R}=\sum_{i=0}^{1}\sum_{j=0}^{1}C_{ij}\int_{Z_i}P(H_j|y)p(y)dy,
R=i=0∑1j=0∑1Cij∫ZiP(Hj∣y)p(y)dy,(17)交换积分和求和顺序,有
(18)
R
=
∑
i
=
0
1
∫
Z
i
∑
j
=
0
1
C
i
j
P
(
H
j
∣
y
)
p
(
y
)
d
y
=
∑
i
=
0
1
∫
Z
i
β
i
(
y
)
p
(
y
)
d
y
,
\tag{18} \begin{aligned} {\mathcal R}&=\sum_{i=0}^{1}\int_{Z_i}\sum_{j=0}^{1}C_{ij}P(H_j|y)p(y)dy\\ &=\sum_{i=0}^{1}\int_{Z_i}\beta_i(y)p(y)dy, \end{aligned}
R=i=0∑1∫Zij=0∑1CijP(Hj∣y)p(y)dy=i=0∑1∫Ziβi(y)p(y)dy,(18)其中
(19)
β
i
(
y
)
=
∑
j
=
0
1
C
i
j
P
(
H
j
∣
y
)
\tag{19} \beta_i(y)=\sum_{j=0}^{1}C_{ij}P(H_j|y)
βi(y)=j=0∑1CijP(Hj∣y)(19)为观测空间中每个点
y
y
y对应的条件代价。最小化贝叶斯代价
R
\mathcal R
R的最优接收机采用判决准则
(20)
β
0
(
y
)
H
1
>
<
H
0
β
1
(
y
)
.
\tag{20} \beta_0(y)\begin{aligned}H_1\\>\\<\\H_0\end{aligned}\ \beta_1(y).
β0(y)H1><H0 β1(y).(20)
令
r
(
y
)
r(y)
r(y)表示最优接收机的条件代价,则
(21)
r
(
y
)
=
min
[
β
0
(
y
)
,
β
1
(
y
)
]
,
\tag{21} r(y)=\min[\beta_0(y),\beta_1(y)],
r(y)=min[β0(y),β1(y)],(21)利用数学等式
(22)
min
(
a
,
b
)
=
1
2
(
a
+
b
)
−
1
2
∣
a
−
b
∣
,
\tag{22} \min(a,b)=\frac{1}{2}(a+b)-\frac{1}{2}|a-b|,
min(a,b)=21(a+b)−21∣a−b∣,(22)我们将
r
(
y
)
r(y)
r(y)表示为
(23)
r
(
y
)
=
1
2
[
β
0
(
y
)
+
β
1
(
y
)
]
−
1
2
∣
β
0
(
y
)
−
β
1
(
y
)
∣
.
\tag{23} r(y)=\frac{1}{2}[\beta_0(y)+\beta_1(y)]-\frac{1}{2}|\beta_0(y)-\beta_1(y)|.
r(y)=21[β0(y)+β1(y)]−21∣β0(y)−β1(y)∣.(23)利用
β
0
(
y
)
\beta_0(y)
β0(y)以及
β
1
(
y
)
\beta_1(y)
β1(y)的定义以及贝叶斯准则
P
(
H
j
∣
y
)
=
P
j
p
(
y
∣
H
j
)
p
(
y
)
,
P(H_j|y)=\frac{P_jp(y|H_j)}{p(y)},
P(Hj∣y)=p(y)Pjp(y∣Hj),我们可以把(23)表示为
(24)
r
(
y
)
=
1
2
P
(
y
)
[
P
0
(
C
00
+
C
10
)
p
(
y
∣
H
0
)
+
P
1
(
C
01
+
C
11
)
p
(
y
∣
H
1
)
−
∣
P
1
(
C
01
−
C
11
)
p
(
y
∣
H
1
)
−
P
0
(
C
10
+
C
00
)
p
(
y
∣
H
0
∣
]
.
\tag{24} \begin{aligned} r(y)=&\frac{1}{2P(y)}{\Large[} P_0(C_{00}+C_{10})p(y|H_0)+P_1(C_{01}+C_{11})p(y|H_1)\\ &-|P_1(C_{01}-C_{11})p(y|H_1)-P_0(C_{10}+C_{00})p(y|H_0|{\Large]}. \end{aligned}
r(y)=2P(y)1[P0(C00+C10)p(y∣H0)+P1(C01+C11)p(y∣H1)−∣P1(C01−C11)p(y∣H1)−P0(C10+C00)p(y∣H0∣].(24)基于(18)以及(21),可以得到
(25)
R
=
∫
Z
r
(
y
)
p
(
y
)
d
y
.
\tag{25} \begin{aligned} {\mathcal R}=\int_{Z}r(y)p(y)dy. \end{aligned}
R=∫Zr(y)p(y)dy.(25)将(24)代入(25),得
(26)
R
min
=
C
0
−
1
2
∫
Z
∣
(
C
01
−
C
11
)
P
1
p
(
y
∣
H
1
)
−
(
C
10
−
C
00
)
P
0
p
(
y
∣
H
0
)
∣
d
y
,
\tag{26} {\mathcal R}_{\min}=C_0-\frac{1}{2}\int_{Z}|(C_{01}-C_{11})P_1p(y|H_1)-(C_{10}-C_{00})P_0p(y|H_0)|dy,
Rmin=C0−21∫Z∣(C01−C11)P1p(y∣H1)−(C10−C00)P0p(y∣H0)∣dy,(26)其中
C
0
=
1
2
(
C
00
+
C
10
)
P
0
+
1
2
(
C
01
+
C
11
)
P
1
.
C_0=\frac{1}{2}(C_{00}+C_{10})P_0+\frac{1}{2}(C_{01}+C_{11})P_1.
C0=21(C00+C10)P0+21(C01+C11)P1.特殊情况下,
C
00
=
C
11
=
0
C_{00}=C_{11}=0
C00=C11=0,
C
01
=
C
10
=
1
C_{01}=C_{10}=1
C01=C10=1,我们得到
(27)
R
min
=
1
2
−
1
2
∫
Z
∣
P
1
p
(
y
∣
H
1
)
−
P
0
p
(
y
∣
H
0
)
∣
d
y
.
\tag{27} {\mathcal R}_{\min}=\frac{1}{2}-\frac{1}{2}\int_{Z}|P_1p(y|H_1)-P_0p(y|H_0)|dy.
Rmin=21−21∫Z∣P1p(y∣H1)−P0p(y∣H0)∣dy.(27)由此得到最优贝叶斯检测系统的最小可达错误率,称为Kolmogorov variational distance。