出典: フリー百科事典『ウィキペディア(Wikipedia)』
最大事後確率 (さいだいじごかくりつ、英 : Maximum a posteriori, MAP )推定 は、統計学 において、実測データに基づいて未知の量の点推定 を行う手法である。ロナルド・フィッシャー の最尤法 (ML) に密接に関連するが、推定したい量の事前分布 を利用して最適化された結果を得る。したがってMAP推定は、ML推定の正規化と見ることができる。
概要
x
{\displaystyle x}
の観測に基づいて、未知の母集団パラメータ
θ
{\displaystyle \theta }
を推定したいとする。
x
{\displaystyle x}
の標本分布 を
f
{\displaystyle f}
とすると、母集団パラメータを
θ
{\displaystyle \theta }
としたときの
x
{\displaystyle x}
の確率は
f
(
x
|
θ
)
{\displaystyle f(x|\theta )}
となる。すると
θ
↦
f
(
x
|
θ
)
{\displaystyle \theta \mapsto f(x|\theta )\!}
という関数は尤度関数 であり、
θ
^
M
L
(
x
)
=
arg
max
θ
f
(
x
|
θ
)
{\displaystyle {\hat {\theta }}_{\mathrm {ML} }(x)=\arg \max _{\theta }f(x|\theta )\!}
は
θ
{\displaystyle \theta }
の最尤推定である。
ここで、
θ
{\displaystyle \theta }
の事前分布を
g
{\displaystyle g}
とする。すると、
θ
{\displaystyle \theta }
をベイズ推定 における確率変数 として扱える。
θ
{\displaystyle \theta }
の事後確率 は次のようになる。
θ
↦
f
(
x
|
θ
)
g
(
θ
)
∫
Θ
f
(
x
|
θ
′
)
g
(
θ
′
)
d
θ
′
{\displaystyle \theta \mapsto {\frac {f(x|\theta )\,g(\theta )}{\displaystyle \int _{\Theta }f(x|\theta ')\,g(\theta ')\,d\theta '}}\!}
ここで
g
{\displaystyle g}
は
θ
{\displaystyle \theta }
の密度関数、
Θ
{\displaystyle \Theta }
は
g
{\displaystyle g}
の定義域である。これはベイズの定理 の直接的な応用である。
最大事後確率推定の手法では、次に
θ
{\displaystyle \theta }
をこの確率変数の事後分布の最頻値 として推定する。
θ
^
M
A
P
(
x
)
=
arg
max
θ
f
(
x
|
θ
)
g
(
θ
)
∫
Θ
f
(
x
|
θ
′
)
g
(
θ
′
)
d
θ
′
=
arg
max
θ
f
(
x
|
θ
)
g
(
θ
)
{\displaystyle {\hat {\theta }}_{\mathrm {MAP} }(x)=\arg \max _{\theta }{\frac {f(x|\theta )\,g(\theta )}{\displaystyle \int _{\Theta }f(x|\theta ')\,g(\theta ')\,d\theta '}}=\arg \max _{\theta }f(x|\theta )\,g(\theta )\!}
事後分布の分母は
θ
{\displaystyle \theta }
に依存していないので、最適化には何の役割も果たさない。
θ
{\displaystyle \theta }
のMAP推定の結果は、ML推定で事前分布
g
{\displaystyle g}
が一様分布の場合に一致する。MAP推定は、一様損失関数におけるベイズ推定 関数である。
MAP推定の計算方法はいくつか存在する。
例
ある並び
(
x
1
,
…
,
x
n
)
{\displaystyle (x_{1},\dots ,x_{n})}
の独立な確率変数
N
(
μ
,
σ
v
2
)
{\displaystyle N(\mu ,\sigma _{v}^{2})}
があり、
μ
{\displaystyle \mu }
の事前分布は
N
(
0
,
σ
m
2
)
{\displaystyle N(0,\sigma _{m}^{2})}
で与えられるとする。ここで
μ
{\displaystyle \mu }
のMAP推定値を求める。
最大化すべき関数は次のようになる。
π
(
μ
)
L
(
μ
)
=
1
2
π
σ
m
exp
(
−
1
2
(
μ
σ
m
)
2
)
∏
j
=
1
n
1
2
π
σ
v
exp
(
−
1
2
(
x
j
−
μ
σ
v
)
2
)
{\displaystyle \pi (\mu )L(\mu )={\frac {1}{{\sqrt {2\pi }}\sigma _{m}}}\exp \left(-{\frac {1}{2}}\left({\frac {\mu }{\sigma _{m}}}\right)^{2}\right)\prod _{j=1}^{n}{\frac {1}{{\sqrt {2\pi }}\sigma _{v}}}\exp \left(-{\frac {1}{2}}\left({\frac {x_{j}-\mu }{\sigma _{v}}}\right)^{2}\right)}
これは、次の式で
μ
{\displaystyle \mu }
を最小化することと等価である。
∑
j
=
1
n
(
x
j
−
μ
σ
v
)
2
+
(
μ
σ
m
)
2
{\displaystyle \sum _{j=1}^{n}\left({\frac {x_{j}-\mu }{\sigma _{v}}}\right)^{2}+\left({\frac {\mu }{\sigma _{m}}}\right)^{2}}
従って μ のMAP推定値は以下のようになる。
μ
^
M
A
P
=
σ
m
2
n
σ
m
2
+
σ
v
2
∑
j
=
1
n
x
j
{\displaystyle {\hat {\mu }}_{MAP}={\frac {\sigma _{m}^{2}}{n\sigma _{m}^{2}+\sigma _{v}^{2}}}\sum _{j=1}^{n}x_{j}}
σ
m
→
∞
{\displaystyle \sigma _{m}\to \infty }
の場合を無情報事前分布(non-informative prior)と呼び、この例では
μ
^
M
A
P
→
μ
^
M
L
E
{\displaystyle {\hat {\mu }}_{MAP}\to {\hat {\mu }}_{MLE}}
である。
関連項目
参考文献
M. DeGroot, Optimal Statistical Decisions , McGraw-Hill, (1970).
Harold W. Sorenson, (1980) "Parameter Estimation: Principles and Problems", Marcel Dekker.