LoginSignup
1
0

More than 1 year has passed since last update.

はじめに

 本記事は, 機械学習の教科書の決定版ともいえる, Christopher Bishop先生による『Pattern Recognition and Machine Learning (パターン認識と機械学習)』 , 通称PRMLの演習問題のうち, 私が解いた問題の解答を記したものです. これは, 私の所属する生物測定学研究室 の輪読会でPRMLを取り扱っており, その勉強の一環として演習問題を解いたときのものです. なお, 他の演習問題の解答例に関する記事については, PRML 演習問題 解答集 まとめ をご覧ください.

問題

 多変量ガウス分布 $\mathcal N (\mathrm x \, | \, \mathbf \mu , \, \Sigma) $ のエントロピーが

$$
\mathrm H [\mathbf{x}] = \frac{1}{2} \ln |\Sigma| + \frac {D}{2} (1 + \ln 2 \pi)
$$
となることを示せ.ただし, $D$ は $\mathbf x $ の次元数である.


解答

 微分エントロピーの形

\mathrm H [\mathbf{x}] = - \int p(\mathbf x) \, \ln \, p(\mathbf x) \, \mathrm d \mathbf x

および, $D$ 次元ベクトル $\mathbf x$ に対する多変量ガウス分布

\mathcal N (\mathbf x \, | \,  \mathbf \mu , \,  \Sigma) = \frac{1}{(2 \pi )^{D/2}} \frac{1}{|\Sigma|^{1/2}}\exp \left\{- \frac 1 2  ({\mathbf x - \mathbf \mu})^ \mathrm T  \Sigma^{-1} ({\mathbf x - \mathbf \mu}) \right\}

より,

\begin{aligned}
\mathrm H [\mathbf{x}] &= - \int p(\mathbf x) \, \ln \, p(\mathbf x) \, \mathrm d \mathbf x
\\
& = - \int \mathcal N (\mathbf x \, | \,  \mathbf \mu , \,  \Sigma) \, \ln \, \mathcal N (\mathbf x \, | \,  \mathbf \mu , \,  \Sigma) \, \mathrm d \mathbf x
\end{aligned}

が示される.ここで,確率密度関数の計算を簡単にするため,あらかじめ $\exp$ の内部を変形する.対角成分の和であるトレースの性質 $\text{scalar} = tr \text{(scalar)} $ および $tr(ABC)= tr(CAB)$ を用いると,

\begin{aligned}
({\mathbf x - \mathbf \mu})^ \mathrm T  \Sigma^{-1} ({\mathbf x - \mathbf \mu}) &= tr\left\{({\mathbf x - \mathbf \mu})^ \mathrm T  \Sigma^{-1} ({\mathbf x - \mathbf \mu}) \right\}
\\
& = tr\left\{\Sigma^{-1}({\mathbf x - \mathbf \mu})({\mathbf x - \mathbf \mu})^ \mathrm T  \right\}
\\
& = tr\left\{\Sigma^{-1} \Sigma \right\}
\\
&= tr(I_D)
\\
&= D
\end{aligned}

と表すことができる.これより,

\begin{aligned}
\ln \, \mathcal N (\mathbf x \, | \,  \mathbf \mu , \,  \Sigma)  &= \ln \left\{ \frac {1}{2 \pi ^{D/2}} \times \frac{1}{|\Sigma|^{1/2}} \times\exp (- \frac D 2 ) \right\}
\\
& = -\frac{D}{2} \ln 2 \pi - \ln \frac 1 2 |\Sigma| - \frac D 2 
\end{aligned}

となるので,

\begin{aligned}
\mathrm H [\mathbf{x}] & = - \int \mathcal N (\mathbf x \, | \,  \mathbf \mu , \,  \Sigma) \, \ln \, \mathcal N (\mathbf x \, | \,  \mathbf \mu , \,  \Sigma) \, \mathrm d \mathbf x
\\ 
& = - \int \mathcal N (\mathbf x \, | \,  \mathbf \mu , \,  \Sigma) \left\{  -\frac{D}{2} \ln 2 \pi - \ln \frac 1 2 |\Sigma| - \frac D 2  \right\} \, \mathrm d \mathbf x
\\ 
& = \frac{D}{2} \ln 2 \pi \int \mathcal N (\mathbf x \, | \,  \mathbf \mu , \,  \Sigma) \, \mathrm d \mathbf x + \ln \frac 1 2 |\Sigma| \int \mathcal N (\mathbf x \, | \,  \mathbf \mu , \,  \Sigma) \, \mathrm d \mathbf x+ \frac D 2 \int \mathcal N (\mathbf x \, | \,  \mathbf \mu , \,  \Sigma) \, \mathrm d \mathbf x
\end{aligned}

が示される.ここで,ガウス分布の積分形 $\int \mathcal N (\mathbf x \, | \, \mathbf \mu , \, \Sigma) \, \mathrm d \mathbf x$ は $1$ となるので,

\begin{aligned}
\mathrm H [\mathbf{x}] & = \frac{D}{2} \ln 2 \pi + \ln \frac 1 2 |\Sigma| +\frac D 2 
\\
& = \frac{1}{2} \ln |\Sigma| + \frac {D}{2}  (1 + \ln 2 \pi)
\end{aligned}

よって示された.


1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0