ユーザ用ツール

サイト用ツール


prml演習9.2の解答old

PRML演習9.2の解答OLD

作業中

\[ \newcommand\tcmt[1]{\class{TinyCmt}{\mbox{#1}}} \newcommand\cmt[1]{\class{Cmt}{\mbox{#1}}} \newcommand\cause[1]{\class{Tiny}{(\because #1)}} \newcommand\l{\left} \newcommand\r{\right} \newcommand\b[1]{\class{Bold}{\mathrm{#1}}} \newcommand\bw{\b{w}} \newcommand\bx{\b{x}} \newcommand\independent{\class{Independent}{\vDash}} \newcommand\nindependent{\not\,\kern-0.2em\independent} \]


(実験1)

(9.5)式の逐次計算で本当にデータの平均が求められるのか試してみる。

(9.5)式において \(\bx_n\) は一次元とし \(\eta_n = \frac{1}{n}\) また \(\mu_1^{(0)} = -1,\ \mu_2^{(0)}=1\) とする。 \[ \newcommand\mb[1]{\mu_1^{(#1)}} \newcommand\mr[1]{\mu_2^{(#1)}} \newcommand\rev[1]{\frac{1}{#1}} \newcommand\RED{\color{red}} \newcommand\BLUE{\color{blue}} \class{Tiny}{ \begin{array}{l|l} \BLUE{x_1 = -2.09} & \BLUE{x_1は\mu_1に近い~~~\mb{1} = \mb{0} + \rev{1}(x_1 - \mb{0}) = -1 + \rev{1}(-2.09 - (-1)) = -2.09} \\ \hline \RED{x_2 = 2.81} & \RED{x_2は\mu_2に近い~~~\mr{1} = \mr{0} + \rev{2}(x_2 - \mr{0}) = 1 + \rev{2}(2.81 - 1) = 1.91} \\ \hline \BLUE{x_3 = -1.24} & \BLUE{x_3は\mu_1に近い~~~\mb{2} = \mb{1} + \rev{3}(x_3 - \mb{1}) = -2.09 + \rev{3}(-1.24 - (-2.09)) = -1.81} \\ \hline \RED{x_4 = 2.01} & \RED{x_4は\mu_2に近い~~~\mr{2} = \mr{1} + \rev{4}(x_4 - \mr{1}) = 1.91 + \rev{4}(2.01 - 1.91) = 1.94} \\ \hline \BLUE{x_5 = -1.88} & \BLUE{x_5は\mu_1に近い~~~\mb{3} = \mb{2} + \rev{5}(x_5 - \mb{2}) = -1.81 + \rev{5}(-1.88 - (-1.81)) = -1.82} \\ \hline \RED{x_6 = 2.53} & \RED{x_6は\mu_2に近い~~~\mr{3} = \mr{2} + \rev{6}(x_6 - \mr{2}) = 1.94 + \rev{6}(2.53 - 1.94) = 2.04} \\ \hline \BLUE{x_7 = -2.54} & \BLUE{x_7は\mu_1に近い~~~\mb{4} = \mb{3} + \rev{7}(x_7 - \mb{3}) = -1.82 + \rev{7}(-2.54 - (-1.82)) = -1.92} \\ \hline \RED{x_8 = 3.76} & \RED{x_8は\mu_2に近い~~~\mr{4} = \mr{3} + \rev{8}(x_8 - \mr{3}) = 2.04 + \rev{8}(3.76 - 2.04) = 2.26} \\ \hline \BLUE{x_9 = -3.28} & \BLUE{x_9は\mu_1に近い~~~\mb{5} = \mb{4} + \rev{9}(x_9 - \mb{4}) = -1.92 + \rev{9}(-3.28 - (-1.92)) = -2.07} \\ \end{array} } \] \(x_1,\ x_3,\ x_5,\ x_7,x_9\) の算術平均は \(\color{darkgreen}{\bar x = -2.21} \)
\(x_2,\ x_4,\ x_6,\ x_8\) の算術平均は \(\color{darkmagenta}{\bar x = 2.78} \)

各平均とデータ点を数直線上にプロットすると上図のようになる。逐次的な平均が算術平均に近づいていってるように見える。

((9.5)式とRobbins-Monroアルゴリズムの関係)

2.3.5節のRobbins-Monroアルゴリズムにおける確率変数 \(\theta,\ z\) と同時分布 \(p(\theta,z)\) と決定関数 \(f(\theta)\) が(9.5)式の各項とどのように関係するのか考える。

prml演習9.2の解答old.txt · 最終更新: 2018/01/04 11:57 by ma

ページ用ツール