{"id":605,"date":"2021-12-20T17:05:21","date_gmt":"2021-12-20T08:05:21","guid":{"rendered":"https:\/\/www.avelio.co.jp\/math\/wordpress\/?p=605"},"modified":"2021-12-22T11:22:05","modified_gmt":"2021-12-22T02:22:05","slug":"%e7%8a%b6%e6%85%8b%e7%a9%ba%e9%96%93%e3%83%a2%e3%83%87%e3%83%ab","status":"publish","type":"post","link":"https:\/\/www.avelio.co.jp\/math\/wordpress\/?p=605","title":{"rendered":"\u3010\u72b6\u614b\u7a7a\u9593\u30e2\u30c7\u30eb\u3011\u30ab\u30eb\u30de\u30f3\u30d5\u30a3\u30eb\u30bf\u3092 Python\u3067\u5b9f\u88c5\u3057\u3066\u307f\u305f"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">1. \u72b6\u614b\u7a7a\u9593\u30e2\u30c7\u30eb<\/h1>\n\n\n\n<p>\u72b6\u614b\u7a7a\u9593\u30e2\u30c7\u30eb\u306f\u30012\u3064\u306e\u78ba\u7387\u904e\u7a0b\u304b\u3089\u306a\u308a\u307e\u3059\u3002\uff11\u3064\u306f\u6f5c\u5728\u5909\u6570\u30fb\u72b6\u614b\u5909\u6570\u30fb\u96a0\u308c\u5909\u6570\u3068\u3044\u308f\u308c\u308b\u3082\u306e\u3067\u3001\u3053\u308c\u306f\u76f4\u63a5\u89b3\u6e2c\u3067\u304d\u306a\u3044\u304c\u30de\u30eb\u30b3\u30d5\u9023\u9396\u306b\u5f93\u3046\u5909\u6570\u3060\u3068\u30e2\u30c7\u30ea\u30f3\u30b0\u3055\u308c\u307e\u3059\u3002\u4f8b\u3048\u3070\u666f\u6c17\u306e\u826f\u3057\u30fb\u60aa\u3057\u7b49\u3001\u6982\u5ff5\u3068\u3057\u3066\u5b58\u5728\u3059\u308b\u3051\u308c\u3069\u76f4\u63a5\u306f\u89b3\u6e2c\u3067\u304d\u306a\u3044\u3082\u306e\u3092\u60f3\u50cf\u3057\u3066\u304f\u3060\u3055\u3044\u3002\uff12\u3064\u3081\u306f\u89b3\u6e2c\u5024\u3067\u3001\u3053\u308c\u306f\u76f4\u63a5\u89b3\u6e2c\u3067\u304d\u308b\u3082\u306e\u3001\u3064\u307e\u308a\u30c7\u30fc\u30bf\u3067\u3059\u3002\u305f\u3060\u3057\u5909\u6570\u306b\u4f9d\u5b58\u3057\u3066\u89b3\u6e2c\u3055\u308c\u308b\u3068\u3057\u307e\u3059\u3002\u4eca\u306e\u4f8b\u3067\u3059\u3068\u3001\u4f8b\u3048\u3070\u682a\u4fa1\u306a\u3069\u3092\u60f3\u50cf\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u610f\u5473\u3068\u3057\u3066\u306f\u682a\u4fa1\u306f\u666f\u6c17\u306e\u826f\u3057\u60aa\u3057\u306b\u4f9d\u5b58\u3057\u3066\u6c7a\u307e\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002\u3053\u306e\u89b3\u6e2c\u5024\u306b\u3082\u300c\u72b6\u614b\u5909\u6570\u3067\u6761\u4ef6\u3065\u3051\u308b\u3068\u904e\u53bb\u306e\u81ea\u5206\u81ea\u8eab\u3068\u306f\u72ec\u7acb\u3068\u306a\u308b\u300d\u3068\u3044\u3046\u4eee\u5b9a\u3092\u7f6e\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1.1. \u72b6\u614b\u7a7a\u9593\u30e2\u30c7\u30eb\u306e\u5b9a\u5f0f\u5316<\/h2>\n\n\n\n<p>\\( t = 1,2,&#8230;,T \\) \u3092\u6642\u523b\u3068\u3057\u307e\u3059\u3002\\( d_{ \\boldsymbol{ x } } \\) \u6b21\u5143\u306e\u72b6\u614b\u30d9\u30af\u30c8\u30eb \\( d_{ \\boldsymbol{ y } } \\) \u6b21\u5143\u306e\u89b3\u6e2c\u30d9\u30af\u30c8\u30eb \\( \\boldsymbol{ y }_t \\) \u3068\u3044\u3046\u30d9\u30af\u30c8\u30eb\u5024\u5909\u6570\u3092\u5c0e\u5165\u3057\u307e\u3059\u3002\u3053\u306e\u3068\u304d\u3001\u72b6\u614b\u7a7a\u9593\u30e2\u30c7\u30eb\u306e\u4e00\u822c\u7684\u306a\u8868\u73fe\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>$$<br>\\begin{align}<br>\\boldsymbol{ x }_t  &amp;=  F_t (   \\boldsymbol{ x }_{ t-1 } , \\boldsymbol{ v }_t  )  \\tag{1} \\\\ <br>\\boldsymbol{ y }_t  &amp;=  H_t (   \\boldsymbol{ x }_t , \\boldsymbol{ w }_t  )   \\tag{2}  \\\\ <br>\\boldsymbol{ x }_0  &amp;\\sim  \\mathcal{ N } (  \\boldsymbol{ \\mu }_0 ,  V_0  )  \\tag{3}  \\\\<br>\\boldsymbol{ v }_t  &amp;\\sim  \\mathcal{ N } (  \\boldsymbol{ 0 } ,  Q_t  )  \\tag{4}   \\\\<br>\\boldsymbol{ w }_t  &amp;\\sim  \\mathcal{ N } (  \\boldsymbol{ 0 } ,  R_t  )  \\tag{5}  <br>\\end{align}<br>$$<\/p>\n\n\n\n<p>(1)\u5f0f\u306f<strong>\u30b7\u30b9\u30c6\u30e0\u30e2\u30c7\u30eb<\/strong>\u3001(2)\u5f0f\u306f<strong>\u89b3\u6e2c\u30e2\u30c7\u30eb<\/strong>\u3001\\( \\boldsymbol{ v }_t \\) \u3068 \\( \\boldsymbol{ w }_t \\) \u306f\u305d\u308c\u305e\u308c<strong>\u30b7\u30b9\u30c6\u30e0\u30ce\u30a4\u30ba<\/strong>\u3001<strong>\u89b3\u6e2c\u30ce\u30a4\u30ba<\/strong>\u3068\u547c\u3070\u308c\u307e\u3059\u3002 \u30b0\u30e9\u30d5\u30a3\u30ab\u30eb\u30e2\u30c7\u30eb\u3067\u8868\u3059\u3068\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"366\" src=\"https:\/\/www.avelio.co.jp\/math\/wordpress\/wp-content\/uploads\/2021\/12\/image-11.png\" alt=\"\" class=\"wp-image-812\"\/><\/figure>\n\n\n\n<p>\u30b0\u30e9\u30d5\u30a3\u30ab\u30eb\u30e2\u30c7\u30eb\u3092\u898b\u308c\u3070\u4e00\u76ee\u77ad\u7136\u3067\u3059\u304c\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306a\u6761\u4ef6\u4ed8\u304d\u72ec\u7acb\u6027\u304c\u6210\u308a\u7acb\u3061\u307e\u3059\u3002<\/p>\n\n\n\n<p>$$<br>\\begin{align}<br>p ( \\boldsymbol{ x }_t  |  \\boldsymbol{ x }_{ 1 : t-1 } ,  \\boldsymbol{ y }_{ 1 : t-1 }  ) &amp;=  p ( \\boldsymbol{ x }_t  |  \\boldsymbol{ x }_{ t-1 } )  \\tag{6}  \\\\  <br>p ( \\boldsymbol{ y }_t  |  \\boldsymbol{ x }_{ 1 : t } ,  \\boldsymbol{ y }_{ 1 : t-1 }  ) &amp;=  p ( \\boldsymbol{ y }_t  |  \\boldsymbol{ x }_{ t } )  \\tag{7}  <br>\\end{align}<br>$$<\/p>\n\n\n\n<p>\u8981\u3059\u308b\u306b\u3001\u72b6\u614b\u7cfb\u5217\u306f\u30de\u30eb\u30b3\u30d5\u904e\u7a0b\u3067\u3042\u308a\u3001\u89b3\u6e2c\u5024\u306f\u305d\u306e\u3068\u304d\u306e\u72b6\u614b\u306b\u3088\u3063\u3066\u306e\u307f\u6c7a\u307e\u308b\u3053\u3068\u3092\u610f\u5473\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">2. \u9010\u6b21\u7684\u306a\u72b6\u614b\u63a8\u5b9a\u6cd5\u306e\u4e00\u822c\u8ad6<\/h1>\n\n\n\n<p>\u4eca\u3001\u6642\u523b \\( j \\) \u307e\u3067\u306b\u5f97\u3089\u308c\u305f\u89b3\u6e2c\u5168\u4f53\u3092\u3001<\/p>\n\n\n\n<p>$$ y_{1:j} \\equiv \\{ y_1,&#8230;,y_j \\} \\tag{8}$$<\/p>\n\n\n\n<p>\u3068\u8868\u3059\u3053\u3068\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u72b6\u614b\u7a7a\u9593\u30e2\u30c7\u30eb\u306b\u304a\u3051\u308b\u3042\u308b\u6642\u70b9 \\( t \\) \u306e\u72b6\u614b \\( \\boldsymbol{ x }_t \\) \u306b\u3064\u3044\u3066\u3001\u3042\u308b\u4e00\u5b9a\u533a\u9593\u306e\u89b3\u6e2c \\( y_{1:j} \\) \u3092\u5f97\u305f\u4e0b\u3067\u306e\u63a8\u5b9a\u306b\u3064\u3044\u3066\u8003\u3048\u307e\u3059\u3002\u3053\u308c\u306f\u3001\\( p(\\boldsymbol{x}_t | y_{1:j} ) \\) \u3068\u3044\u3046\u6761\u4ef6\u4ed8\u304d\u5468\u8fba\u5206\u5e03\u306e\u63a8\u5b9a\u3092\u5f97\u308b\u3053\u3068\u306b\u5bfe\u5fdc\u3057\u307e\u3059\u3002\u3053\u306e\u6761\u4ef6\u4ed8\u304d\u5468\u8fba\u5206\u5e03\u306f\u89b3\u6e2c\u6642\u70b9 \\( j \\) \u3068\u63a8\u5b9a\u3059\u308b\u72b6\u614b\u306e\u6642\u70b9 \\( t \\) \u3068\u306e\u95a2\u4fc2\u306b\u3088\u308a\u3001\u6b21\u306e\uff13\u7a2e\u985e\u306b\u5206\u985e\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\\( t &gt; j \\) \u306e\u5834\u5408\uff1a<strong>\u4e88\u6e2c\u5206\u5e03<\/strong> (\u7279\u306b, \\(t=j+1\\) \u306e\u3068\u304d\u3092<strong>\u4e00\u671f\u5148\u4e88\u6e2c\u5206\u5e03<\/strong>\u3068\u547c\u3073\u307e\u3059)<\/li><li>\\( t = j \\) \u306e\u5834\u5408\uff1a<strong>\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u5206\u5e03<\/strong><\/li><li>\\( t &lt; j \\) \u306e\u5834\u5408\uff1a<strong>\u5e73\u6ed1\u5316\u5206\u5e03<\/strong><\/li><\/ul>\n\n\n\n<p>\u4e88\u6e2c\u5206\u5e03\u3092\u63a8\u5b9a\u3059\u308b\u3053\u3068\u3092<strong>\u4e88\u6e2c<\/strong>\u3068\u547c\u3073\u307e\u3059\u3002\u540c\u69d8\u306b\u3001\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u5206\u5e03\u3001\u5e73\u6ed1\u5316\u5206\u5e03\u3092\u63a8\u5b9a\u3059\u308b\u3053\u3068\u3092\u305d\u308c\u305e\u308c<strong>\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0<\/strong>\u3001<strong>\u5e73\u6ed1\u5316<\/strong>\u3068\u547c\u3073\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"697\" height=\"294\" src=\"https:\/\/www.avelio.co.jp\/math\/wordpress\/wp-content\/uploads\/2021\/12\/image-15.png\" alt=\"\" class=\"wp-image-822\"\/><\/figure>\n\n\n\n<p>\u3055\u3066\u3001\u4ee5\u4e0b\u3067\u3053\u306e\u5e73\u6ed1\u5316\u30fb\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u30fb\u4e88\u6e2c\u3092 <strong>&#8220;\u9010\u6b21\u7684\u306b&#8221;<\/strong> \u5b9f\u884c\u3059\u308b\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>( <strong>&#8220;\u9010\u6b21\u7684\u306b&#8221;<\/strong> \u3068\u5f37\u8abf\u3057\u305f\u306e\u306f\u3001<strong>&#8220;\u30d0\u30c3\u30c1\u51e6\u7406\u7684 (\u4e00\u62ec\u51e6\u7406\u7684) \u306b&#8221;<\/strong> \u5b9f\u884c\u3059\u308b\u65b9\u6cd5\u3082\u3042\u308b\u304b\u3089\u3067\u3059\u3002\u4eca\u56de\u306f\u3001\u30d0\u30c3\u30c1\u51e6\u7406\u7684\u306a\u65b9\u6cd5\u306f\u89e3\u8aac\u3057\u307e\u305b\u3093\u3002)<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2.1. \u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u5206\u5e03\u306e\u9010\u6b21\u8a08\u7b97<\/h2>\n\n\n\n<p>\u6642\u523b \\(t-1\\) \u306e\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u5206\u5e03 \\( p(\\boldsymbol{x}_{t-1} | y_{1:t-1} ) \\) \u304c\u4e0e\u3048\u3089\u308c\u3066\u3044\u308b\u3068\u3057\u307e\u3059\u3002\u3053\u308c\u304b\u3089\u6642\u523b \\(t\\) \u306e\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u5206\u5e03 \\( p(\\boldsymbol{x}_{t} | y_{1:t} ) \\) \u3092\u6c42\u3081\u308b\u306e\u304c\u3001<strong>\u9010\u6b21\u30d9\u30a4\u30ba\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0<\/strong>\u3067\u3059\u3002\u9010\u6b21\u30d9\u30a4\u30ba\u30d5\u30a3\u30eb\u30bf\u306f\u3001\u4e00\u671f\u5148\u4e88\u6e2c\u3068\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3082\uff12\u3064\u306e\u30b9\u30c6\u30c3\u30d7\u3092\u9010\u6b21\u7684\u306b\u884c\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">STEP1. \u4e00\u671f\u5148\u4e88\u6e2c<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>\u2605\u65b9\u91dd\uff1a\u300e\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u5206\u5e03 \\( p(\\boldsymbol{x}_{t-1} | y_{1:t-1} ) \\) \u304b\u3089\u4e00\u671f\u5148\u4e88\u6e2c\u5206\u5e03 \\( p(\\boldsymbol{x}_{t} | y_{1:t-1} ) \\) \u3092\u6c42\u3081\u308b\u300f<\/strong><\/h5>\n\n\n\n<p>$$<br>\\begin{align}<br>p (  \\boldsymbol{ x }_t  |  y_{ 1 : t-1 }  )  <br>&amp;=  \\int  p (  \\boldsymbol{ x }_t  |   \\boldsymbol{ x }_{ t-1 } ,  y_{ 1 : t-1 }  )<br>     p (  \\boldsymbol{ x }_{ t-1 }  |  y_{ 1 : t-1 }  ) d \\boldsymbol{ x }_{ t-1 }  \\tag{9} \\\\<br>&amp;=  \\int  p (  \\boldsymbol{ x }_t  |  \\boldsymbol{ x }_{ t-1 }  )<br>     p (  \\boldsymbol{ x }_{ t-1 }  |  y_{ 1 : t-1 }  ) d \\boldsymbol{ x }_{ t-1 }  \\tag{10} <br>\\end{align}<br>$$<\/p>\n\n\n\n<p>(9)\u5f0f\u304b\u3089(10)\u5f0f\u306e\u5909\u5f62\u306b\u306f\u3001\u300c\u72b6\u614b\u306e\u30de\u30eb\u30b3\u30d5\u6027\u300d\u3092\u7528\u3044\u3066\u3044\u307e\u3059\u3002(10)\u5f0f\u306b\u7740\u76ee\u3059\u308b\u3068\u3001\\( p(\\boldsymbol{x}_{t-1} | y_{1:t-1} ) \\) \u306f\u6240\u4e0e\u306e\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u5206\u5e03\u3067\u3042\u308a\u3001\\(  p (  \\boldsymbol{ x }_t  |  \\boldsymbol{ x }_{ t-1 }  )  \\) \u306f\u30e2\u30c7\u30eb\u304c\u898f\u5b9a\u3059\u308b\u5206\u5e03\u3067\u3059\u304b\u3089\u3001\u3053\u3061\u3089\u3082\u6240\u4e0e\u3067\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001\\(  p (  \\boldsymbol{ x }_t  |  y_{ 1 : t-1 }  )  \\) \u304c\u6c42\u3081\u3089\u308c\u305f\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">STEP2. \u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\"><span class=\"has-inline-color has-black-color\"><strong>\u2605\u65b9\u91dd\uff1a\u300e\u4e00\u671f\u5148\u4e88\u6e2c\u5206\u5e03 \\( p(\\boldsymbol{x}_{t} | y_{1:t-1} ) \\) \u304b\u3089\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u5206\u5e03 \\( p(\\boldsymbol{x}_{t} | y_{1:t} ) \\) \u3092\u6c42\u3081\u308b\u300f<\/strong><\/span> <\/h5>\n\n\n\n<p>$$<br>\\begin{align}<br>p (  \\boldsymbol{ x }_t  |  y_{ 1 : t-1 }  )<br>&amp;\\propto  p (  y_t  |  \\boldsymbol{ x }_t ,  y_{ 1 : t-1 }  )  p (  \\boldsymbol{ x }_t  |  y_{ 1 : t-1 }  )  \\tag{11} \\\\<br>&amp;=  p (  y_t  |  \\boldsymbol{ x }_t  )  p (  \\boldsymbol{ x }_t  |  y_{ 1 : t-1 }  )  \\tag{12} \\\\<br>\\end{align}<br>$$<\/p>\n\n\n\n<p>$$<br>\\begin{align}  <br>\\Longrightarrow~~~    p (  \\boldsymbol{ x }_t  |  y_{ 1 : t-1 }  )  = <br>\\frac{<br>p (  y_t  |  \\boldsymbol{ x }_t  )  p (  \\boldsymbol{ x }_t  |  y_{ 1 : t-1 }  ) <br>}{<br>\\int   p (  y_t  |  \\boldsymbol{ x }_t  )  p (  \\boldsymbol{ x }_t  |  y_{ 1 : t-1 }  ) d  \\boldsymbol{ x }_t <br>} =  \\frac{<br> p (  y_t  |  \\boldsymbol{ x }_t  )  p (  \\boldsymbol{ x }_t  |  y_{ 1 : t-1 }  ) <br>}{<br>p ( \\boldsymbol{ y }_t  | \\boldsymbol{ y }_{1:t-1}  )<br>}  \\tag{13} <br>\\end{align}<br>$$<\/p>\n\n\n\n<p>(11)\u5f0f\u306f\u30d9\u30a4\u30ba\u306e\u5b9a\u7406\u3001 (12)\u5f0f\u306f\u300c\u89b3\u6e2c\u306e\u6761\u4ef6\u4ed8\u304d\u72ec\u7acb\u6027\u300d\u306b\u3088\u308a\u5c0e\u304b\u308c\u307e\u3059\u3002\u6700\u5f8c\u306b\u6b63\u898f\u5316\u3057\u305f\u306e\u304c(13)\u5f0f\u3067\u3059\u304c\u3001\\(   p (  y_t  |  \\boldsymbol{ x }_t  )  \\) \u306f\u30e2\u30c7\u30eb\u304c\u898f\u5b9a\u3059\u308b\u5206\u5e03\u3067\u3001\\(  p (  \\boldsymbol{ x }_t  |  y_{ 1 : t-1 }  )  \\) \u306fSTEP1.\u3067\u5f97\u3089\u308c\u305f\u4e00\u671f\u5148\u4e88\u6e2c\u5206\u5e03\u3067\u3059\u304b\u3089\u3001\u3069\u3061\u3089\u3082\u6240\u4e0e\u3067\u3059\u3002\u3057\u304c\u305f\u3063\u3066\u3001\\(  p (  \\boldsymbol{ x }_t  |  y_{ 1 : t }  )  \\) \u304c\u6c42\u3081\u3089\u308c\u305f\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002 <\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2.2. \u4e88\u6e2c\u5206\u5e03\u306e\u9010\u6b21\u8a08\u7b97<\/h2>\n\n\n\n<p>\u3055\u3066\u3001\u3044\u307e\u6642\u523b \\( j \\) \u307e\u3067\u306e\u89b3\u6e2c\u5168\u4f53 \\( y_{ 1 : j } \\) \u304c\u5f97\u3089\u308c\u3066\u3044\u308b\u3068\u3059\u308b\u3068\u3001\u9010\u6b21\u30d9\u30a4\u30ba\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u306b\u3088\u308a\u3001\\(  p (  \\boldsymbol{ x }_j  |  y_{ 1 : j }  )  \\) \u307e\u3067\u306e\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u5206\u5e03\u3092\u6c42\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4e00\u65b9\u3001\u4e88\u6e2c\u5206\u5e03\u306e\u8a08\u7b97\u3001\u3059\u306a\u308f\u3061\u6642\u523b \\( j \\) \u3088\u308a\u5148\u306e\u72b6\u614b\u306e\u5206\u5e03\u3092\u8a08\u7b97\u3059\u308b\u306b\u306f\u3001\u4e0a\u8a18STEP1 (\u4e00\u671f\u5148\u4e88\u6e2c) \u306e\u8a08\u7b97\u65b9\u6cd5\u3092\u5fdc\u7528\u3059\u308c\u3070\u3088\u3044\u308f\u3051\u3067\u3059\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>\u2605\u65b9\u91dd\uff1a\u300e\\( k \\) \u671f\u5148\u4e88\u6e2c\u5206\u5e03 \\( p(\\boldsymbol{x}_{j+k} | y_{ 1:j } ) \\) \u304b\u3089  \\( k+1 \\) \u671f\u5148\u4e88\u6e2c\u5206\u5e03 \\( p(\\boldsymbol{x}_{j+k+1} | y_{ 1:j } ) \\) \u3092\u6c42\u3081\u308b\u300f<\/strong><\/h5>\n\n\n\n<p>\u5f0f\u3092\u898b\u3084\u3059\u304f\u3059\u308b\u305f\u3081\u306b\u3001\\( t = j+k \\) \u3068\u304a\u304f\u3002<\/p>\n\n\n\n<p>$$<br>\\begin{align}<br>p (  \\boldsymbol{ x }_{ t+1 }  |  y_{ 1 : j }  )<br>&amp;=  \\int  p (  \\boldsymbol{ x }_{ t+1 }  |  y_{ 1 : j } ,  \\boldsymbol{ x }_t  )  p (  \\boldsymbol{ x }_t  |  y_{ 1 : j }  )  d \\boldsymbol{ x }_{ j+k }    \\tag{14} \\\\<br>&amp;=   \\int  p (  \\boldsymbol{ x }_{ t+1 }  |  \\boldsymbol{ x }_t  )  p (  \\boldsymbol{ x }_t  |  y_{ 1 : j }  )  d \\boldsymbol{ x }_t   \\tag{15} <br>\\end{align}<br>$$<\/p>\n\n\n\n<p>\u4e0a\u8a18\u306e\u8a08\u7b97\u3092\u7e70\u308a\u8fd4\u3059\u3053\u3068\u3067\u3001\u4e88\u6e2c\u5206\u5e03\u304b\u3089\u3055\u3089\u306b\u305d\u306e\u4e00\u6642\u70b9\u5148\u306e\u4e88\u6e2c\u5206\u5e03\u304c\u9010\u6b21\u7684\u306b\u8a08\u7b97\u3055\u308c\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4e88\u6e2c\u5206\u5e03\u3092\u4f7f\u3063\u3066\u3001\u3055\u3089\u306b\u305d\u306e\u5148\u306e\u72b6\u614b\u3092\u4e88\u6e2c\u3059\u308b\u3053\u3068\u3092\u7e70\u308a\u8fd4\u3059\u306e\u3067\u3001\u5148\u306e\u72b6\u614b\u306b\u306a\u308c\u3070\u306a\u308b\u307b\u3069\u3001\u7cbe\u5ea6\u304c\u60aa\u3044\u63a8\u5b9a\u306b\u306a\u308b\u306e\u306f\u5bb9\u6613\u306b\u60f3\u50cf\u3067\u304d\u307e\u3059\u3002 <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2.3. \u5e73\u6ed1\u5316\u5206\u5e03\u306e\u9010\u6b21\u8a08\u7b97<\/h2>\n\n\n\n<p>\u6642\u523b \\( j \\) \u307e\u3067\u306e\u89b3\u6e2c\u5168\u4f53 \\( y_{ 1 : j } \\) \u304c\u5f97\u3089\u308c\u3066\u3044\u308b\u3068\u4eee\u5b9a\u3057\u3066\u30012.1.\u3067\u306f\u6642\u523b \\( j \\) \u307e\u3067\u306e\u5404\u6642\u523b\u306e\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u5206\u5e03\u3092\u5c0e\u51fa\u3057\u30012.2.\u3067\u306f\u6642\u523b \\( j \\) \u3088\u308a\u5148\u306e\u72b6\u614b\u306e\u5206\u5e03 (=\u4e88\u6e2c\u5206\u5e03) \u3092\u8a08\u7b97\u3057\u3066\u304d\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u3044\u307e\u3001\u6642\u523b \\( j \\) \u3088\u308a\u3082\u524d\u306e\u6642\u523b \\( t ~ \\small{(&lt;j)}  \\) \u306e\u72b6\u614b\u5206\u5e03\u3068\u3057\u3066\u3001\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u5206\u5e03 \\(  p (\\boldsymbol{ x }_t | y_{ 1:t })  \\)\u304c\u5f97\u3089\u308c\u3066\u3044\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u3053\u306e\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u5206\u5e03\u306f\u89b3\u6e2c\u5168\u4f53 \\( y_{ 1 : j } \\) \u306e\u3046\u3061\u3001\\( y_{ 1 : t } \\) \u306e\u89b3\u6e2c\u7d50\u679c\u3057\u304b\u5229\u7528\u3057\u3066\u304a\u3089\u305a\u3001\u6b8b\u308a\u306e \\( y_{ t+1 : j } \\) \u306e\u60c5\u5831\u3092\u53cd\u6620\u3057\u3066\u3044\u307e\u305b\u3093\u3002(\u5b9f\u306b\u3082\u3063\u305f\u3044\u306a\u3044)<\/p>\n\n\n\n<p>\u305d\u3053\u3067\u3001  \u672a\u53cd\u6620\u306e\u89b3\u6e2c\u7d50\u679c \\( y_{ t+1 : j } \\) \u3092\u6642\u523b \\( t~ \\small{(&lt;j)} \\) \u306e\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u5206\u5e03\u306b\u53cd\u6620\u3059\u308b\u3053\u3068\u3067\u5206\u5e03\u3092\u66f4\u65b0\u3057\u307e\u3059\u3002\u3053\u3046\u3057\u3066\u5f97\u3089\u308c\u308b\u6642\u523b \\( t~ \\small{(&lt;j)} \\) \u306e\u72b6\u614b\u5206\u5e03\u304c\u5e73\u6ed1\u5316\u5206\u5e03\u3068\u306a\u308b\u308f\u3051\u3067\u3059\u3002\u5f97\u3089\u308c\u3066\u3044\u308b\u89b3\u6e2c\u5024\u3092\u30d5\u30eb\u6d3b\u7528\u3057\u3066\u3044\u308b\u5206\u3001\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u5206\u5e03\u3088\u308a\u3082\u7cbe\u5ea6\u306e\u9ad8\u3044\u72b6\u614b\u63a8\u5b9a\u304c\u884c\u3048\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306b\u5e73\u6ed1\u5316\u5206\u5e03\u3092\u5c0e\u51fa\u3057\u3066\u3044\u304d\u307e\u3059\u3002\u6642\u523b \\( j \\) \u304b\u3089\u6642\u9593\u9006\u65b9\u5411\u306b\u9010\u6b21\u7684\u306b\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u5206\u5e03\u306e\u66f4\u65b0\u3092\u884c\u3046\u4f5c\u6226\u3092\u53d6\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>\u2605\u65b9\u91dd\uff1a\u300e\u5e73\u6ed1\u5316\u5206\u5e03 \\( p(\\boldsymbol{x}_{t+1} | y_{ 1:j } ) \\) \u304b\u3089\u4e00\u3064\u524d\u6642\u70b9\u306e\u5e73\u6ed1\u5316\u5206\u5e03 \\( p(\\boldsymbol{x}_t | y_{ 1:j } ) \\) \u3092\u6c42\u3081\u308b\u300f<\/strong><\/h5>\n\n\n\n<p>\u3053\u3053\u306f\u5c0e\u51fa\u904e\u7a0b\u3092\u4e01\u5be7\u306b\u8a18\u8ff0\u3059\u308b\u3068\u3001\u7d50\u69cb\u9577\u304f\u306a\u3063\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u5272\u611b\u3055\u305b\u3066\u3044\u305f\u3060\u304d\u307e\u3059\u3002\u7d50\u679c\u306e\u95a2\u4fc2\u5f0f\u3060\u3051\u4e0b\u306b\u8a18\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>$$<br>\\begin{align}<br>p (  \\boldsymbol{ x }_t  |  y_{ 1 : j }  )<br>=   p (  \\boldsymbol{ x }_t  |  y_{ 1 : t }  ) <br>\\int  \\frac{<br>p (  \\boldsymbol{ x }_{ t+1 }  |  y_{ 1 : j }  )<br>p (  \\boldsymbol{ x }_{ t+1 }  |  \\boldsymbol{ x }_t  ) <br>}{  <br>p (  \\boldsymbol{ x }_{ t+1 }  |   y_{ 1 : t }  )<br>} <br>d \\boldsymbol{ x }_{ t+1 }  \\tag{16} <br>\\end{align}<br>$$<\/p>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306b\u3057\u3066\u89b3\u6e2c\u5168\u4f53\u3092\u5229\u7528\u3057\u305f\u5e73\u6ed1\u5316\u5206\u5e03\u3092\u6c42\u3081\u308b\u3053\u3068\u3092\u3001<strong>\u56fa\u5b9a\u533a\u9593\u5e73\u6ed1\u5316<\/strong>\u3068\u547c\u3073\u307e\u3059\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">3. \u7dda\u5f62\u30ac\u30a6\u30b9\u72b6\u614b\u7a7a\u9593\u30e2\u30c7\u30eb\u3068\u30ab\u30eb\u30de\u30f3\u30d5\u30a3\u30eb\u30bf\u30fc<\/h1>\n\n\n\n<p>\u4e00\u822c\u7684\u306b\u3001\u72b6\u614b\u7a7a\u9593\u30e2\u30c7\u30eb\u306e\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u5206\u5e03\u3084\u4e88\u6e2c\u5206\u5e03\u306e\u8a08\u7b97\u306f\u3001CH.2\u3067\u898b\u305f\u3088\u3046\u306b\u3001\u8907\u96d1\u306a\u7a4d\u5206\u3092\u4f34\u3046\u305f\u3081\u89e3\u6790\u7684\u306b\u89e3\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093&#8230;.\u3057\u3087\u3093\u307c\u308a\u3002MCMC\u306a\u3069\u306e\u6570\u5024\u8fd1\u4f3c\u304c\u5fc5\u8981\u306b\u306a\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002\u3057\u304b\u3057\u3001<strong>\u7dda\u5f62\u30ac\u30a6\u30b9\u72b6\u614b\u7a7a\u9593\u30e2\u30c7\u30eb<\/strong>\u3068\u3044\u3046\u7279\u5225\u306a\u30b1\u30fc\u30b9\u306b\u304a\u3044\u3066\u306f\u3001\u306a\u3093\u3068\u89e3\u6790\u7684\u306b\u89e3\u3051\u307e\u3059\uff01\u305d\u306e\u89e3\u6cd5\u3092\u30ab\u30eb\u30de\u30f3\u30d5\u30a3\u30eb\u30bf\u30fc(\u30ab\u30eb\u30de\u30f3\u4e88\u6e2c\u30fb\u30ab\u30eb\u30de\u30f3\u5e73\u6ed1\u5316)\u3068\u3044\u3044\u307e\u3059\u3002( MCMC\u306a\u3069\u306e\u6570\u5024\u8fd1\u4f3c\u306b\u3088\u308b\u89e3\u6cd5\u306b\u3064\u3044\u3066\u306f\u3001\u4eca\u56de\u306f\u6271\u3044\u307e\u305b\u3093)<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3.1. \u7dda\u5f62\u30ac\u30a6\u30b9\u72b6\u614b\u7a7a\u9593\u30e2\u30c7\u30eb<\/h2>\n\n\n\n<p>\u4e00\u822c\u5316\u72b6\u614b\u7a7a\u9593\u30e2\u30c7\u30eb\u306b\u304a\u3044\u3066\u3001\\(  F_t ,  G_t  \\) \u304c\u7dda\u5f62\u3067\u3042\u308a\u3001\u72b6\u614b\u30fb\u89b3\u6e2c\u304c\u3068\u3082\u306b\u6b63\u898f\u5206\u5e03\u306b\u5f93\u3046\u3068\u304d\u3001\u3068\u304f\u306b<strong>\u7dda\u5f62\u30ac\u30a6\u30b9\u72b6\u614b\u7a7a\u9593\u30e2\u30c7\u30eb<\/strong>\u3068\u547c\u3070\u308c\u307e\u3059\u3002\u5177\u4f53\u7684\u306a\u5f0f\u306b\u66f8\u304d\u4e0b\u3059\u3068\u3001<\/p>\n\n\n\n<p>$$<br>\\begin{align}<br>\\boldsymbol{ x }_t  &amp;=  F_t \\boldsymbol{ x }_{ t-1 } + \\boldsymbol{ v }_t   \\tag{17} \\\\<br>\\boldsymbol { y }_t  &amp;=  G_t \\boldsymbol{ x }_t + \\boldsymbol{ w }_t   \\tag{18} \\\\<br>\\end{align}<br>$$<\/p>\n\n\n\n<p>\u3068\u306a\u308a\u307e\u3059\u3002\u3053\u3053\u3067\u3001\\(  F_t  \\) \u306f \\(  d_x \\times d_x  \\) \u884c\u5217\u3001\\(  G_t  \\) \u306f \\(  d_y \\times d_x  \\) \u884c\u5217\u3067\u305d\u308c\u305e\u308c<strong>\u30b7\u30b9\u30c6\u30e0\u884c\u5217<\/strong>\u3001<strong>\u89b3\u6e2c\u884c\u5217<\/strong>\u3068\u547c\u3070\u308c\u307e\u3059\u3002\\(  \\boldsymbol{v}_t \\) \u3068 \\( \\boldsymbol{w}_t \\) \u306f\u305d\u308c\u305e\u308c \\( \\mathcal{N}(\\boldsymbol{0}, Q_t), \\mathcal{N}(\\boldsymbol{0},R_t) \\) \u306b\u5f93\u3046\u3068\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u7dda\u5f62\u30ac\u30a6\u30b9\u72b6\u614b\u7a7a\u9593\u30e2\u30c7\u30eb\u3067\u306f\u3001\u6b63\u898f\u5206\u5e03\u306e\u6b63\u898f\u6027\u304b\u3089\u5bfe\u8c61\u3068\u306a\u308b\u5206\u5e03\u306f\u3059\u3079\u3066\u6b63\u898f\u5206\u5e03\u306b\u306a\u308a\u307e\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u5e73\u5747\u30d9\u30af\u30c8\u30eb\u3068\u5171\u5206\u6563\u884c\u5217\u3055\u3048\u8a08\u7b97\u3067\u304d\u308c\u3070\u5206\u5e03\u304c\u7279\u5b9a\u3067\u304d\u308b\u308f\u3051\u3067\u3059\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3.1. \u4e0b\u6e96\u5099 <\/h2>\n\n\n\n<p>\u72b6\u614b \\(\\boldsymbol{x}_t\\) \u306e\u6761\u4ef6\u4ed8\u304d\u5e73\u5747\u3068\u5171\u5206\u6563\u884c\u5217\u306b\u5bfe\u3057\u3066\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u8a18\u6cd5\u3092\u7528\u610f\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>$$<br>\\begin{align}<br>\\boldsymbol{x}_{t|j} &amp;:= \\textrm{E}[\\boldsymbol{x}_t|\\boldsymbol{y}_{1:j}]  \\tag{19} \\\\<br>V_{t|j} &amp;:= \\textrm{E}[( \\boldsymbol{x}_t &#8211; \\boldsymbol{x}_{t|j} )( \\boldsymbol{x}_t &#8211; \\boldsymbol{x}_{t|j} )^T]  \\tag{20} <br>\\end{align}<br>$$<\/p>\n\n\n\n<p>\u3055\u3066\u3001\u4ee5\u4e0b\u3067\u306f\u3001\u30ab\u30eb\u30de\u30f3\u30d5\u30a3\u30eb\u30bf\u30fc\u306e\u8a08\u7b97\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u306a\u304c\u3089\u3001python\u3092\u7528\u3044\u3066\u30ab\u30eb\u30de\u30f3\u30d5\u30a3\u30eb\u30bf\u30fc\u30af\u30e9\u30b9\u3092\u5b9f\u88c5\u3057\u3066\u3044\u304d\u307e\u3059\u3002\u307e\u305a\u3001\u7dda\u5f62\u30ac\u30a6\u30b9\u72b6\u614b\u7a7a\u9593\u30e2\u30c7\u30eb\u306f<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u30b7\u30b9\u30c6\u30e0\u884c\u5217<\/li><li>\u89b3\u6e2c\u884c\u5217<\/li><li>\u30b7\u30b9\u30c6\u30e0\u30ce\u30a4\u30ba\u306e\u5171\u5206\u6563\u884c\u5217<\/li><li>\u89b3\u6e2c\u30ce\u30a4\u30ba\u306e\u5171\u5206\u6563\u884c\u5217<\/li><li>\u72b6\u614b\u306e\u521d\u671f\u5024\u306e\u5e73\u5747\u30d9\u30af\u30c8\u30eb<\/li><li>\u72b6\u614b\u306e\u521d\u671f\u5024\u306e\u5171\u5206\u6563\u884c\u5217<\/li><\/ul>\n\n\n\n<p>\u3067\u898f\u5b9a\u3055\u308c\u308b\u306e\u3067\u3001\u521d\u671f\u5316\u306e\u969b\u306b\u3053\u308c\u3089\u3092\u30bb\u30c3\u30c8\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002\u5b9f\u88c5\u306b\u95a2\u3057\u3066\u306f\u3001\u30b7\u30b9\u30c6\u30e0\u884c\u5217\u30fb\u89b3\u6e2c\u884c\u5217\u30fb\u30b7\u30b9\u30c6\u30e0\u30ce\u30a4\u30ba\u306e\u5171\u5206\u6563\u884c\u5217\u30fb\u89b3\u6e2c\u30ce\u30a4\u30ba\u306e\u5171\u5206\u6563\u884c\u5217\u304c\u5171\u306b\u6642\u9593\u306b\u4f9d\u3089\u306a\u3044\u30b7\u30f3\u30d7\u30eb\u306a\u30b1\u30fc\u30b9\u3092\u66f8\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import numpy as np\n\nclass KalmanFilter(object):\n    def __init__(self, system_matrix, observation_matrix,\n                 system_cov, observation_cov,\n                 initial_state_mean, initial_state_cov,):\n        self.system_matrix = np.array(system_matrix)\n        self.observation_matrix = np.array(observation_matrix)\n        self.system_cov = np.array(system_cov)\n        self.observation_cov = np.array(observation_cov)\n        self.initial_state_mean = np.array(initial_state_mean)\n        self.initial_state_cov = np.array(initial_state_cov)<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3.2. \u30ab\u30eb\u30de\u30f3\u30d5\u30a3\u30eb\u30bf\u30fc<\/h2>\n\n\n\n<p>\u3053\u306e\u30d1\u30fc\u30c8\u306f\u3001\u300c2.1.\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u5206\u5e03\u306e\u9010\u6b21\u8a08\u7b97\u300d\u306e\u7dda\u5f62\u30ac\u30a6\u30b9\u72b6\u614b\u7a7a\u9593\u30e2\u30c7\u30eb\u306b\u304a\u3051\u308b\u89e3\u6790\u7684\u306a\u89e3\u6cd5\u306e\u8aac\u660e\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">STEP1. \u4e00\u671f\u5148\u4e88\u6e2c<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>\u2605\u65b9\u91dd\uff1a\u300e\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u5206\u5e03 \\( p(\\boldsymbol{x}_{t-1} | y_{1:t-1} )=\\mathcal{N}(\\boldsymbol{x}_{t-1|t-1},V_{t-1|t-1}) \\) \u304b\u3089\u4e00\u671f\u5148\u4e88\u6e2c\u5206\u5e03 \\( p(\\boldsymbol{x}_{t} | y_{1:t-1} )= \\mathcal{N}(\\boldsymbol{x}_{t|t-1},V_{t|t-1}) \\) \u3092\u6c42\u3081\u308b\u300f<\/strong> <\/h5>\n\n\n\n<p>$$<br>\\begin{align}<br>\\boldsymbol{x}_{t|t-1} &amp;= F_t   \\boldsymbol{x}_{t-1|t-1}  \\tag{21} \\\\<br>V_{t|t-1} &amp;=  F_t V_{t-1|t-1}  F_t ^T + Q_t  \\tag{22} <br>\\end{align}<br>$$<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def filter_predict(self, current_state_mean, current_state_cov):\n    predicted_state_mean = self.system_matrix @ current_state_mean\n    predicted_state_cov = (\n        self.system_matrix\n        @ current_state_cov\n        @ self.system_matrix.T\n        + self.system_cov\n    )\n    return (predicted_state_mean, predicted_state_cov)<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">STEP2. \u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>\u2605\u65b9\u91dd\uff1a\u300e\u4e00\u671f\u5148\u4e88\u6e2c\u5206\u5e03 \\( p(\\boldsymbol{x}_{t} | y_{1:t-1} )=\\mathcal{N}(\\boldsymbol{x}_{t|t-1},V_{t|t-1}) \\) \u304b\u3089\u4e00\u671f\u5148\u4e88\u6e2c\u5206\u5e03 \\( p(\\boldsymbol{x}_{t} | y_{1:t} )= \\mathcal{N}(\\boldsymbol{x}_{t|t},V_{t|t}) \\) \u3092\u6c42\u3081\u308b\u300f  <\/strong><\/h5>\n\n\n\n<p>$$<br>\\begin{align}<br>K_t &amp;= V_{t|t-1} G_t^T ( G_t V_{t|t-1} G_t^T + R_t)^{-1}   \\tag{23} \\\\<br>\\boldsymbol{x}_{t|t} &amp;=  \\boldsymbol{x}_{t|t-1} + K_t (y_t &#8211; G_t  \\boldsymbol{x}_{t|t-1} )  \\tag{24} \\\\<br>V_{t|t} &amp;= V_{t|t-1} &#8211; K_tG_tV_{t|t-1}  \\tag{25} <br>\\end{align}<br>$$<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def filter_update(self, predicted_state_mean, predicted_state_cov, observation):\n    kalman_gain = (\n        predicted_state_cov \n        @ self.observation_matrix.T \n        @ np.linalg.inv(\n            self.observation_matrix\n            @ predicted_state_cov\n            @ self.observation_matrix.T\n            + self.observation_cov\n        )\n    )\n    filtered_state_mean = (\n        predicted_state_mean\n        + kalman_gain\n        @ (observation\n           - self.observation_matrix\n           @ predicted_state_mean)\n    )\n    filtered_state_cov = (\n        predicted_state_cov\n        - (kalman_gain\n           @ self.observation_matrix\n           @ predicted_state_cov)\n    )\n    return (filtered_state_mean, filtered_state_cov)<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>\u4e0a\u8a18\u306eSTEP1,2\u3092\u9010\u6b21\u7684\u306b\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u3001\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u5206\u5e03\u304c\u8a08\u7b97\u3055\u308c\u307e\u3059\u3002\u6700\u5f8c\u306b\u9010\u6b21\u8a08\u7b97\u90e8\u5206\u3092\u5b9f\u88c5\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def filter(self, observations):\n    observations = np.array(observations)\n    \n    n_timesteps = len(observations)\n    n_dim_state = len(self.initial_state_mean)\n    \n    predicted_state_means = np.zeros((n_timesteps, n_dim_state))\n    predicted_state_covs = np.zeros((n_timesteps, n_dim_state, n_dim_state))\n    filtered_state_means = np.zeros((n_timesteps, n_dim_state))\n    filtered_state_covs = np.zeros((n_timesteps, n_dim_state, n_dim_state))\n    \n    for t in range(n_timesteps):\n        if t == 0:\n            predicted_state_means&#91;t] = self.initial_state_mean\n            predicted_state_covs&#91;t] = self.initial_state_cov\n        else:\n            predicted_state_means&#91;t], predicted_state_covs&#91;t] = self.filter_predict(\n                filtered_state_means&#91;t-1],\n                filtered_state_covs&#91;t-1]\n            )\n        filtered_state_means&#91;t], filtered_state_covs&#91;t] = self.filter_update(\n            predicted_state_means&#91;t],\n            predicted_state_covs&#91;t],\n            observations&#91;t]\n        )\n    \n    return (\n        filtered_state_means,\n        filtered_state_covs,\n        predicted_state_means,\n        predicted_state_covs\n    )<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3.3. \u30ab\u30eb\u30de\u30f3\u4e88\u6e2c<\/h2>\n\n\n\n<p>\u3053\u306e\u30d1\u30fc\u30c8\u306f\u3001\u300c2.2.\u4e88\u6e2c\u5206\u5e03\u306e\u9010\u6b21\u8a08\u7b97\u300d\u306e\u7dda\u5f62\u30ac\u30a6\u30b9\u72b6\u614b\u7a7a\u9593\u30e2\u30c7\u30eb\u306b\u304a\u3051\u308b\u89e3\u6790\u7684\u306a\u89e3\u6cd5\u306e\u8aac\u660e\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3084\u3063\u3066\u3044\u308b\u3053\u3068\u81ea\u4f53\u306f\u30ab\u30eb\u30de\u30f3\u30d5\u30a3\u30eb\u30bf\u306eSTEP1.\u3068\u4f55\u3089\u5909\u308f\u3089\u306a\u3044\u306e\u3067\u3001\u30e1\u30bd\u30c3\u30c9\u306b\u95a2\u3057\u3066\u3082\u3001 \u30ab\u30eb\u30de\u30f3\u30d5\u30a3\u30eb\u30bf\u306eSTEP1. \u3067\u5b9a\u7fa9\u3057\u305f <code>predict<\/code>\u30e1\u30bd\u30c3\u30c9\u3092\u5229\u7528\u3059\u308c\u3070\u3088\u3044\u3067\u3059\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>\u2605\u65b9\u91dd\uff1a\u300e\\( k \\) \u671f\u5148\u4e88\u6e2c\u5206\u5e03 \\( p(\\boldsymbol{x}_{j+k} | y_{ 1:j } ) = \\mathcal{N}(\\boldsymbol{x}_{j+k|j},V_{j+k|j})  \\) \u304b\u3089  \\( k+1 \\) \u671f\u5148\u4e88\u6e2c\u5206\u5e03 \\( p(\\boldsymbol{x}_{j+k+1} | y_{ 1:j } ) =  \\mathcal{N}(\\boldsymbol{x}_{j+k+1|j},V_{j+k+1|j})  \\) \u3092\u6c42\u3081\u308b\u300f<\/strong><\/h5>\n\n\n\n<p>$$<br>\\begin{align} <br>\\boldsymbol{x}_{j+k+1|j} &amp;= F_{ j+k+1 }   \\boldsymbol{x}_{ j+k |j}  \\tag{26} \\\\<br>V_{ j+k+1 |j} &amp;=  F_{ j+k+1 } V_{ j+k|j}  F_{ j+k+1 } ^T + Q_{ j+k+1 }  \\tag{27} <br>\\end{align}<br>$$ <\/p>\n\n\n\n<p>\u4e00\u671f\u5148\u4e88\u6e2c\u306e `filter_predict` \u3092\u7528\u3044\u3066\u3001\\( k \\) \u671f\u5148\u307e\u3067\u306e\u4e88\u6e2c\u5206\u5e03\u3092\u8fd4\u3059\u30e1\u30bd\u30c3\u30c9\u3092\u7528\u610f\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def predict(self, n_timesteps, observations):\n    (filtered_state_means,\n    filtered_state_covs,\n    predicted_state_means,\n    predicted_state_covs) = self.filter(observations)\n\n    _, n_dim_state = filtered_state_means.shape\n\n    predicted_state_means = np.zeros((n_timesteps, n_dim_state))\n    predicted_state_covs = np.zeros((n_timesteps, n_dim_state, n_dim_state))\n\n    for t in range(n_timesteps):\n        if t == 0:\n            predicted_state_means&#91;t], predicted_state_covs&#91;t] = self.filter_predict(\n                filtered_state_means&#91;-1],\n                filtered_state_covs&#91;-1]\n            )\n        else:\n            predicted_state_means&#91;t], predicted_state_covs&#91;t] = self.filter_predict(\n                predicted_state_means&#91;t-1],\n                predicted_state_covs&#91;t-1]\n            )\n\n    return (predicted_state_means, predicted_state_covs)<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">3.4. \u30ab\u30eb\u30de\u30f3\u5e73\u6ed1\u5316<\/h2>\n\n\n\n<p>\u3053\u306e\u30d1\u30fc\u30c8\u306f\u3001\u300c2.3.\u5e73\u6ed1\u5316\u5206\u5e03\u306e\u9010\u6b21\u8a08\u7b97\u300d\u306e\u7dda\u5f62\u30ac\u30a6\u30b9\u72b6\u614b\u7a7a\u9593\u30e2\u30c7\u30eb\u306b\u304a\u3051\u308b\u89e3\u6790\u7684\u306a\u89e3\u6cd5\u306e\u8aac\u660e\u3068\u306a\u308a\u307e\u3059\u3002 <\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>\u2605\u65b9\u91dd\uff1a\u300e\u5e73\u6ed1\u5316\u5206\u5e03 \\( p(\\boldsymbol{x}_{t+1} | y_{ 1:T } )=\\mathcal{N}(\\boldsymbol{x}_{t+1|T},V_{t+1|T}) \\) \u304b\u3089\u4e00\u3064\u524d\u6642\u70b9\u306e\u5e73\u6ed1\u5316\u5206\u5e03 \\( p(\\boldsymbol{x}_t | y_{ 1:T } )= \\mathcal{N}(\\boldsymbol{x}_{t|T},V_{t|T})  \\) \u3092\u6c42\u3081\u308b\u300f <\/strong><\/h5>\n\n\n\n<p>$$<br>\\begin{align}<br>A_t &amp;= V_{t|t} F_{t+1}^T V_{t+1|t}   \\tag{28} \\\\<br>\\boldsymbol{x}_{t|T} &amp;=  \\boldsymbol{x}_{t|t} +A_t( \\boldsymbol{x}_{t+1|T} &#8211;  \\boldsymbol{x}_{t+1|t}  ) \\tag{29} \\\\<br>V_{t|T} &amp;= V_{t|t} +A_t(V_{t+1|T}-V_{t+1|t})A_t^T   \\tag{30} <br>\\end{align}<br>$$<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def smooth_update(self, filtered_state_mean, filtered_state_cov,\n                    predicted_state_mean, predicted_state_cov,\n                    next_smoothed_state_mean, next_smoothed_state_cov):\n    kalman_smoothing_gain = (\n        filtered_state_cov\n        @ self.system_matrix.T\n        @ np.linalg.inv(predicted_state_cov)\n    )\n    smoothed_state_mean = (\n        filtered_state_mean\n        + kalman_smoothing_gain\n        @ (next_smoothed_state_mean - predicted_state_mean)\n    )\n    smoothed_state_cov = (\n        filtered_state_cov\n        + kalman_smoothing_gain\n        @ (next_smoothed_state_cov - predicted_state_cov)\n        @ kalman_smoothing_gain.T\n    )\n    return (smoothed_state_mean, smoothed_state_cov)<\/code><\/pre>\n\n\n\n<p>\u4e0a\u8a18\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u6642\u9593\u9006\u65b9\u5411\u306b\u9010\u6b21\u7684\u306b\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u3001\u3059\u3079\u3066\u306e\u5e73\u6ed1\u5316\u5206\u5e03\u304c\u5f97\u3089\u308c\u307e\u3059\u3002\u305d\u306e\u5e73\u6ed1\u5316\u306e\u9010\u6b21\u51e6\u7406\u3092\u5b9f\u88c5\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def smooth(self, observations):\n    (filtered_state_means,\n    filtered_state_covs,\n    predicted_state_means,\n    predicted_state_covs) = self.filter(observations)\n\n    n_timesteps, n_dim_state = filtered_state_means.shape\n\n    smoothed_state_means = np.zeros((n_timesteps, n_dim_state))\n    smoothed_state_covs = np.zeros((n_timesteps, n_dim_state, n_dim_state))\n\n    smoothed_state_means&#91;-1] = filtered_state_means&#91;-1]\n    smoothed_state_covs&#91;-1] = filtered_state_covs&#91;-1]\n\n    for t in reversed(range(n_timesteps - 1)):\n        smoothed_state_means&#91;t], smoothed_state_covs&#91;t] = self.smooth_update(\n            filtered_state_means&#91;t],\n            filtered_state_covs&#91;t],\n            predicted_state_means&#91;t+1],\n            predicted_state_covs&#91;t+1],\n            smoothed_state_means&#91;t+1],\n            smoothed_state_covs&#91;t+1]\n        )\n    \n    return (smoothed_state_means, smoothed_state_covs)<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">4. \u5b9f\u969b\u306b\u52d5\u304b\u3057\u3066\u307f\u305f<\/h1>\n\n\n\n<p>\u30ed\u30fc\u30ab\u30eb\u30ec\u30d9\u30eb\u30e2\u30c7\u30eb\u3068\u547c\u3070\u308c\u308b\u72b6\u614b\u3082\u89b3\u6e2c\u3082\u4e00\u6b21\u5143\u306e\u7c21\u5358\u306a\u30e2\u30c7\u30eb\u3067\u5b9f\u9a13\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<p>$$<br>\\begin{align}<br>x_t &amp;= x_{t-1} + v_t   \\tag{31} \\\\<br>y_t &amp;= x_t + w_t  \\tag{32} \\\\<br>v_t &amp;\\sim \\mathcal{N}(0, 1)  \\tag{33} \\\\<br>w_t &amp;\\sim \\mathcal{N}(0, 10)  \\tag{34}  <br>\\end{align}<br>$$<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4.1. \u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u751f\u6210<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>np.random.seed(1) # \u4e71\u6570\u56fa\u5b9a\n\nn_timesteps = 120\n\nsystem_matrix = &#91;&#91;1]]\nobservation_matrix = &#91;&#91;1]]\nsystem_cov = &#91;&#91;1]]\nobservation_cov = &#91;&#91;10]]\ninitial_state_mean = &#91;0]\ninitial_state_cov = &#91;&#91;1e7]]\n\n\nstates = np.zeros(n_timesteps)\nobservations = np.zeros(n_timesteps)\nsystem_noise = np.random.multivariate_normal(\n    np.zeros(1),\n    system_cov,\n    n_timesteps\n)\nobservation_noise = np.random.multivariate_normal(\n    np.zeros(1),\n    observation_cov,\n    n_timesteps\n)\n\nstates&#91;0] = initial_state_mean + system_noise&#91;0]\nobservations&#91;0] = states&#91;0] + observation_noise&#91;0]\nfor t in range(1, n_timesteps):\n    states&#91;t] = states&#91;t-1] + system_noise&#91;t]\n    observations&#91;t] = states&#91;t] + observation_noise&#91;t]\n\n# \u5206\u6790\u3059\u308b\u30c7\u30fc\u30bf(\u6642\u523b0\u304b\u308999\u307e\u3067)\u3068\u4e88\u6e2c\u3068\u6bd4\u8f03\u3059\u308b\u7528\u306e\u30c7\u30fc\u30bf(\u6642\u523b100\u4ee5\u964d)\u306b\u5206\u3051\u3066\u304a\u304f\nstates_train = states&#91;:100]\nstates_test = states&#91;100:]\nobservations_train = observations&#91;:100]\nobservations_test = observations&#91;100:]<\/code><\/pre>\n\n\n\n<p>\u751f\u6210\u3055\u308c\u305f\u30c7\u30fc\u30bf\u3092\u63cf\u753b\u3057\u3066\u3044\u307e\u3059\u3002\u9752\u304c\u72b6\u614b\u3001\u30b0\u30ec\u30fc\u304c\u89b3\u6e2c\u5024\u3092\u8868\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import matplotlib.pyplot as plt\n\nupper = 17\nlower = -12\n\nfig, ax = plt.subplots(figsize=(16, 4))\nax.plot(np.arange(n_timesteps), states, label=\" true state\")\nax.plot(np.arange(n_timesteps), observations, color=\"gray\", label=\"observation\")\nax.set_title(\"simulation data\")\nax.set_ylim(lower, upper)\nax.legend(loc='upper left')<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"935\" height=\"264\" src=\"https:\/\/www.avelio.co.jp\/math\/wordpress\/wp-content\/uploads\/2021\/12\/image-19.png\" alt=\"\" class=\"wp-image-916\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">4.2. \u30e2\u30c7\u30eb\u751f\u6210\u3068\u63a8\u5b9a<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># \u30e2\u30c7\u30eb\u751f\u6210\nmodel = KalmanFilter(\n    system_matrix,\n    observation_matrix,\n    system_cov,\n    observation_cov,\n    initial_state_mean,\n    initial_state_cov\n)\n\n# \u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u5206\u5e03\u53d6\u5f97\nfiltered_state_means, filtered_state_covs, _, _ = model.filter(observations_train)\n\n# \u4e88\u6e2c\u5206\u5e03\u53d6\u5f97\npredicted_state_means, predicted_state_covs = model.predict(len(states_test), observations_train)\n\n# \u5e73\u6ed1\u5316\u5206\u5e03\u53d6\u5f97\nsmoothed_state_means, smoothed_state_covs = model.smooth(observations_train)<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">4.3. \u7d50\u679c<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>import matplotlib.pyplot as plt\n\nupper = 17\nlower = -10\n\nT1 = len(states_train)\nT2 = len(states_test)\n\n# \u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u30fb\u4e88\u6e2c\u30fb\u5e73\u6ed1\u5316\u306e\u4e0b\u507495\uff05\u70b9\u3068\u4e0a\u507495\uff05\u70b9\nfiltering_lower95 = filtered_state_means.flatten() - 1.96 * filtered_state_covs.flatten()**(1\/2)\nfiltering_upper95 = filtered_state_means.flatten() + 1.96 * filtered_state_covs.flatten()**(1\/2)\nprediction_lower95 = predicted_state_means.flatten() - 1.96 * predicted_state_covs.flatten()**(1\/2)\nprediction_upper95 = predicted_state_means.flatten() + 1.96 * predicted_state_covs.flatten()**(1\/2)\nsmoothing_lower95 = smoothed_state_means.flatten() - 1.96 * smoothed_state_covs.flatten()**(1\/2)\nsmoothing_upper95 = smoothed_state_means.flatten() + 1.96 * smoothed_state_covs.flatten()**(1\/2)\n\n\nfig, axes = plt.subplots(nrows=3, figsize=(16, 12))\n\n# \u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3068\u4e88\u6e2c\naxes&#91;0].plot(np.arange(T1+T2), states, label=\"true state\")\naxes&#91;0].plot(np.arange(T1), filtered_state_means.flatten(), color=\"red\", label=\"filtering\")\naxes&#91;0].fill_between(np.arange(T1), filtering_lower95, filtering_upper95, color='red', alpha=0.15)\naxes&#91;0].plot(np.arange(T1, T1+T2), predicted_state_means.flatten(), color=\"indigo\", label=\"prediction\")\naxes&#91;0].fill_between(np.arange(T1, T1+T2), prediction_lower95, prediction_upper95, color=\"indigo\", alpha=0.15)\naxes&#91;0].axvline(100, color=\"black\", linestyle=\"--\", alpha=0.5)\naxes&#91;0].set_ylim(lower, upper)\naxes&#91;0].legend(loc='upper left')\naxes&#91;0].set_title(\"Filtering &amp; Prediction\")\n\n# \u5e73\u6ed1\u5316\naxes&#91;1].plot(np.arange(T1+T2), states, label=\"true state\")\naxes&#91;1].plot(np.arange(T1), smoothed_state_means.flatten(), color=\"darkgreen\", label=\"smoothing\")\naxes&#91;1].fill_between(np.arange(T1), smoothing_lower95, smoothing_upper95, color='darkgreen', alpha=0.15)\naxes&#91;1].axvline(100, color=\"black\", linestyle=\"--\", alpha=0.5)\naxes&#91;1].set_ylim(lower, upper)\naxes&#91;1].legend(loc='upper left')\naxes&#91;1].set_title(\"Smoothing\")\n\n# \u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3068\u5e73\u6ed1\u5316\u306e\u4fe1\u983c\u533a\u9593\u306e\u6bd4\u8f03\naxes&#91;2].plot(np.arange(T1), filtering_lower95, color='red', linestyle=\"--\", label='filtering confidence interval')\naxes&#91;2].plot(np.arange(T1), filtering_upper95, color='red', linestyle=\"--\")\naxes&#91;2].fill_between(np.arange(T1), smoothing_lower95, smoothing_upper95, color='darkgreen', alpha=0.3, label='smoothing confidence interval')\naxes&#91;2].axvline(100, color=\"black\", linestyle=\"--\", alpha=0.5)\naxes&#91;2].set_xlim(-6, 125)\naxes&#91;2].set_ylim(lower, upper)\naxes&#91;2].legend(loc='upper left')\naxes&#91;2].set_title(\"Confidence interval: Filtering v.s. Smoothing\")<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"935\" height=\"699\" src=\"https:\/\/www.avelio.co.jp\/math\/wordpress\/wp-content\/uploads\/2021\/12\/image-17.png\" alt=\"\" class=\"wp-image-910\"\/><\/figure>\n\n\n\n<p>\u300c2.2. \u4e88\u6e2c\u5206\u5e03\u306e\u9010\u6b21\u8a08\u7b97\u300d\u3067\u300c\u4e88\u6e2c\u5206\u5e03\u3092\u4f7f\u3063\u3066\u3001\u3055\u3089\u306b\u305d\u306e\u5148\u306e\u72b6\u614b\u3092\u4e88\u6e2c\u3059\u308b\u3053\u3068\u3092\u7e70\u308a\u8fd4\u3059\u306e\u3067\u3001\u5148\u306e\u72b6\u614b\u306b\u306a\u308c\u3070\u306a\u308b\u307b\u3069\u3001\u7cbe\u5ea6\u304c\u60aa\u3044\u63a8\u5b9a\u306b\u306a\u308b\u306e\u306f\u5bb9\u6613\u306b\u60f3\u50cf\u3067\u304d\u307e\u3059\u3002\u300d\u3068\u8ff0\u3079\u307e\u3057\u305f\u304c\u3001\u5b9f\u969b\u306b\u6642\u523b\u304c\u5148\u306b\u306a\u308c\u3070\u306a\u308b\u307b\u3069\u4fe1\u983c\u533a\u9593\u304c\u5e83\u304c\u3063\u3066\u3044\u308b\u69d8\u304c\u898b\u3066\u53d6\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u300c2.3. \u5e73\u6ed1\u5316\u5206\u5e03\u306e\u9010\u6b21\u8a08\u7b97\u300d\u3067\u300c\u5f97\u3089\u308c\u3066\u3044\u308b\u89b3\u6e2c\u5024\u3092\u30d5\u30eb\u6d3b\u7528\u3057\u3066\u3044\u308b\u5206\u3001\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u5206\u5e03\u3088\u308a\u3082\u7cbe\u5ea6\u306e\u9ad8\u3044\u72b6\u614b\u63a8\u5b9a\u304c\u884c\u3048\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\u300d\u3068\u8ff0\u3079\u307e\u3057\u305f\u304c\u3001\u3053\u3061\u3089\u3082\u4fe1\u983c\u533a\u9593\u3092\u6bd4\u8f03\u3057\u305f3\u3064\u76ee\u306e\u56f3\u3067\u78ba\u304b\u3081\u3089\u308c\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. \u72b6\u614b\u7a7a\u9593\u30e2\u30c7\u30eb \u72b6\u614b\u7a7a\u9593\u30e2\u30c7\u30eb\u306f\u30012\u3064\u306e\u78ba\u7387\u904e\u7a0b\u304b\u3089\u306a\u308a\u307e\u3059\u3002\uff11\u3064\u306f\u6f5c\u5728\u5909\u6570\u30fb\u72b6\u614b\u5909\u6570\u30fb\u96a0\u308c\u5909\u6570\u3068\u3044\u308f\u308c\u308b\u3082\u306e\u3067\u3001\u3053\u308c\u306f\u76f4\u63a5\u89b3\u6e2c\u3067\u304d\u306a\u3044\u304c\u30de\u30eb\u30b3\u30d5\u9023\u9396\u306b\u5f93\u3046\u5909\u6570\u3060\u3068\u30e2\u30c7\u30ea\u30f3\u30b0\u3055\u308c\u307e\u3059\u3002\u4f8b\u3048\u3070\u666f\u6c17\u306e\u826f\u3057\u30fb\u60aa\u3057\u7b49\u3001\u6982\u5ff5 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,6],"tags":[],"class_list":["post-605","post","type-post","status-publish","format-standard","hentry","category-5","category-6"],"_links":{"self":[{"href":"https:\/\/www.avelio.co.jp\/math\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/605","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.avelio.co.jp\/math\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.avelio.co.jp\/math\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.avelio.co.jp\/math\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.avelio.co.jp\/math\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=605"}],"version-history":[{"count":307,"href":"https:\/\/www.avelio.co.jp\/math\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/605\/revisions"}],"predecessor-version":[{"id":951,"href":"https:\/\/www.avelio.co.jp\/math\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/605\/revisions\/951"}],"wp:attachment":[{"href":"https:\/\/www.avelio.co.jp\/math\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.avelio.co.jp\/math\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=605"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.avelio.co.jp\/math\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}