ssm_intro.html 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <title>What are State Space Models? &#8212; State Space Models: A Modern Approach</title>
  7. <link href="../../_static/css/theme.css" rel="stylesheet">
  8. <link href="../../_static/css/index.ff1ffe594081f20da1ef19478df9384b.css" rel="stylesheet">
  9. <link rel="stylesheet"
  10. href="../../_static/vendor/fontawesome/5.13.0/css/all.min.css">
  11. <link rel="preload" as="font" type="font/woff2" crossorigin
  12. href="../../_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff2">
  13. <link rel="preload" as="font" type="font/woff2" crossorigin
  14. href="../../_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff2">
  15. <link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
  16. <link rel="stylesheet" type="text/css" href="../../_static/sphinx-book-theme.css?digest=c3fdc42140077d1ad13ad2f1588a4309" />
  17. <link rel="stylesheet" type="text/css" href="../../_static/togglebutton.css" />
  18. <link rel="stylesheet" type="text/css" href="../../_static/copybutton.css" />
  19. <link rel="stylesheet" type="text/css" href="../../_static/mystnb.css" />
  20. <link rel="stylesheet" type="text/css" href="../../_static/sphinx-thebe.css" />
  21. <link rel="stylesheet" type="text/css" href="../../_static/panels-main.c949a650a448cc0ae9fd3441c0e17fb0.css" />
  22. <link rel="stylesheet" type="text/css" href="../../_static/panels-variables.06eb56fa6e07937060861dad626602ad.css" />
  23. <link rel="preload" as="script" href="../../_static/js/index.be7d3bbb2ef33a8344ce.js">
  24. <script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
  25. <script src="../../_static/jquery.js"></script>
  26. <script src="../../_static/underscore.js"></script>
  27. <script src="../../_static/doctools.js"></script>
  28. <script src="../../_static/clipboard.min.js"></script>
  29. <script src="../../_static/copybutton.js"></script>
  30. <script>let toggleHintShow = 'Click to show';</script>
  31. <script>let toggleHintHide = 'Click to hide';</script>
  32. <script>let toggleOpenOnPrint = 'true';</script>
  33. <script src="../../_static/togglebutton.js"></script>
  34. <script>var togglebuttonSelector = '.toggle, .admonition.dropdown, .tag_hide_input div.cell_input, .tag_hide-input div.cell_input, .tag_hide_output div.cell_output, .tag_hide-output div.cell_output, .tag_hide_cell.cell, .tag_hide-cell.cell';</script>
  35. <script src="../../_static/sphinx-book-theme.d59cb220de22ca1c485ebbdc042f0030.js"></script>
  36. <script>const THEBE_JS_URL = "https://unpkg.com/thebe@0.8.2/lib/index.js"
  37. const thebe_selector = ".thebe,.cell"
  38. const thebe_selector_input = "pre"
  39. const thebe_selector_output = ".output, .cell_output"
  40. </script>
  41. <script async="async" src="../../_static/sphinx-thebe.js"></script>
  42. <script>window.MathJax = {"TeX": {"Macros": {"N": "\\mathbb{N}", "floor": ["\\lfloor#1\\rfloor", 1], "bmat": ["\\left[\\begin{array}"], "emat": ["\\end{array}\\right]"]}}, "options": {"processHtmlClass": "tex2jax_process|mathjax_process|math|output_area"}}</script>
  43. <script defer="defer" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
  44. <link rel="index" title="Index" href="../../genindex.html" />
  45. <link rel="search" title="Search" href="../../search.html" />
  46. <link rel="next" title="Hidden Markov Models" href="hmm.html" />
  47. <link rel="prev" title="State Space Models" href="ssm_index.html" />
  48. <meta name="viewport" content="width=device-width, initial-scale=1" />
  49. <meta name="docsearch:language" content="None">
  50. <!-- Google Analytics -->
  51. </head>
  52. <body data-spy="scroll" data-target="#bd-toc-nav" data-offset="80">
  53. <div class="container-fluid" id="banner"></div>
  54. <div class="container-xl">
  55. <div class="row">
  56. <div class="col-12 col-md-3 bd-sidebar site-navigation show" id="site-navigation">
  57. <div class="navbar-brand-box">
  58. <a class="navbar-brand text-wrap" href="../../index.html">
  59. <h1 class="site-logo" id="site-title">State Space Models: A Modern Approach</h1>
  60. </a>
  61. </div><form class="bd-search d-flex align-items-center" action="../../search.html" method="get">
  62. <i class="icon fas fa-search"></i>
  63. <input type="search" class="form-control" name="q" id="search-input" placeholder="Search this book..." aria-label="Search this book..." autocomplete="off" >
  64. </form><nav class="bd-links" id="bd-docs-nav" aria-label="Main">
  65. <div class="bd-toc-item active">
  66. <ul class="nav bd-sidenav">
  67. <li class="toctree-l1">
  68. <a class="reference internal" href="../../root.html">
  69. State Space Models: A Modern Approach
  70. </a>
  71. </li>
  72. </ul>
  73. <ul class="current nav bd-sidenav">
  74. <li class="toctree-l1">
  75. <a class="reference internal" href="../scratch.html">
  76. Scratchpad
  77. </a>
  78. </li>
  79. <li class="toctree-l1 current active has-children">
  80. <a class="reference internal" href="ssm_index.html">
  81. State Space Models
  82. </a>
  83. <input checked="" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox"/>
  84. <label for="toctree-checkbox-1">
  85. <i class="fas fa-chevron-down">
  86. </i>
  87. </label>
  88. <ul class="current">
  89. <li class="toctree-l2 current active">
  90. <a class="current reference internal" href="#">
  91. What are State Space Models?
  92. </a>
  93. </li>
  94. <li class="toctree-l2">
  95. <a class="reference internal" href="hmm.html">
  96. Hidden Markov Models
  97. </a>
  98. </li>
  99. <li class="toctree-l2">
  100. <a class="reference internal" href="lds.html">
  101. Linear Gaussian SSMs
  102. </a>
  103. </li>
  104. <li class="toctree-l2">
  105. <a class="reference internal" href="nlds.html">
  106. Nonlinear Gaussian SSMs
  107. </a>
  108. </li>
  109. <li class="toctree-l2">
  110. <a class="reference internal" href="inference.html">
  111. Inferential goals
  112. </a>
  113. </li>
  114. </ul>
  115. </li>
  116. <li class="toctree-l1 has-children">
  117. <a class="reference internal" href="../hmm/hmm_index.html">
  118. Hidden Markov Models
  119. </a>
  120. <input class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" type="checkbox"/>
  121. <label for="toctree-checkbox-2">
  122. <i class="fas fa-chevron-down">
  123. </i>
  124. </label>
  125. <ul>
  126. <li class="toctree-l2">
  127. <a class="reference internal" href="../hmm/hmm_filter.html">
  128. HMM filtering (forwards algorithm)
  129. </a>
  130. </li>
  131. <li class="toctree-l2">
  132. <a class="reference internal" href="../hmm/hmm_smoother.html">
  133. HMM smoothing (forwards-backwards algorithm)
  134. </a>
  135. </li>
  136. <li class="toctree-l2">
  137. <a class="reference internal" href="../hmm/hmm_viterbi.html">
  138. Viterbi algorithm
  139. </a>
  140. </li>
  141. <li class="toctree-l2">
  142. <a class="reference internal" href="../hmm/hmm_parallel.html">
  143. Parallel HMM smoothing
  144. </a>
  145. </li>
  146. <li class="toctree-l2">
  147. <a class="reference internal" href="../hmm/hmm_sampling.html">
  148. Forwards-filtering backwards-sampling algorithm
  149. </a>
  150. </li>
  151. </ul>
  152. </li>
  153. <li class="toctree-l1 has-children">
  154. <a class="reference internal" href="../lgssm/lgssm_index.html">
  155. Inference in linear-Gaussian SSMs
  156. </a>
  157. <input class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" type="checkbox"/>
  158. <label for="toctree-checkbox-3">
  159. <i class="fas fa-chevron-down">
  160. </i>
  161. </label>
  162. <ul>
  163. <li class="toctree-l2">
  164. <a class="reference internal" href="../lgssm/kalman_filter.html">
  165. Kalman filtering
  166. </a>
  167. </li>
  168. <li class="toctree-l2">
  169. <a class="reference internal" href="../lgssm/kalman_smoother.html">
  170. Kalman (RTS) smoother
  171. </a>
  172. </li>
  173. <li class="toctree-l2">
  174. <a class="reference internal" href="../lgssm/kalman_parallel.html">
  175. Parallel Kalman Smoother
  176. </a>
  177. </li>
  178. <li class="toctree-l2">
  179. <a class="reference internal" href="../lgssm/kalman_sampling.html">
  180. Forwards-filtering backwards sampling
  181. </a>
  182. </li>
  183. </ul>
  184. </li>
  185. <li class="toctree-l1 has-children">
  186. <a class="reference internal" href="../extended/extended_index.html">
  187. Extended (linearized) methods
  188. </a>
  189. <input class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" type="checkbox"/>
  190. <label for="toctree-checkbox-4">
  191. <i class="fas fa-chevron-down">
  192. </i>
  193. </label>
  194. <ul>
  195. <li class="toctree-l2">
  196. <a class="reference internal" href="../extended/extended_filter.html">
  197. Extended Kalman filtering
  198. </a>
  199. </li>
  200. <li class="toctree-l2">
  201. <a class="reference internal" href="../extended/extended_smoother.html">
  202. Extended Kalman smoother
  203. </a>
  204. </li>
  205. <li class="toctree-l2">
  206. <a class="reference internal" href="../extended/extended_parallel.html">
  207. Parallel extended Kalman smoothing
  208. </a>
  209. </li>
  210. </ul>
  211. </li>
  212. <li class="toctree-l1 has-children">
  213. <a class="reference internal" href="../unscented/unscented_index.html">
  214. Unscented methods
  215. </a>
  216. <input class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" type="checkbox"/>
  217. <label for="toctree-checkbox-5">
  218. <i class="fas fa-chevron-down">
  219. </i>
  220. </label>
  221. <ul>
  222. <li class="toctree-l2">
  223. <a class="reference internal" href="../unscented/unscented_filter.html">
  224. Unscented filtering
  225. </a>
  226. </li>
  227. <li class="toctree-l2">
  228. <a class="reference internal" href="../unscented/unscented_smoother.html">
  229. Unscented smoothing
  230. </a>
  231. </li>
  232. </ul>
  233. </li>
  234. <li class="toctree-l1">
  235. <a class="reference internal" href="../quadrature/quadrature_index.html">
  236. Quadrature and cubature methods
  237. </a>
  238. </li>
  239. <li class="toctree-l1">
  240. <a class="reference internal" href="../postlin/postlin_index.html">
  241. Posterior linearization
  242. </a>
  243. </li>
  244. <li class="toctree-l1">
  245. <a class="reference internal" href="../adf/adf_index.html">
  246. Assumed Density Filtering
  247. </a>
  248. </li>
  249. <li class="toctree-l1">
  250. <a class="reference internal" href="../vi/vi_index.html">
  251. Variational inference
  252. </a>
  253. </li>
  254. <li class="toctree-l1">
  255. <a class="reference internal" href="../pf/pf_index.html">
  256. Particle filtering
  257. </a>
  258. </li>
  259. <li class="toctree-l1">
  260. <a class="reference internal" href="../smc/smc_index.html">
  261. Sequential Monte Carlo
  262. </a>
  263. </li>
  264. <li class="toctree-l1 has-children">
  265. <a class="reference internal" href="../learning/learning_index.html">
  266. Offline parameter estimation (learning)
  267. </a>
  268. <input class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" type="checkbox"/>
  269. <label for="toctree-checkbox-6">
  270. <i class="fas fa-chevron-down">
  271. </i>
  272. </label>
  273. <ul>
  274. <li class="toctree-l2">
  275. <a class="reference internal" href="../learning/em.html">
  276. Expectation Maximization (EM)
  277. </a>
  278. </li>
  279. <li class="toctree-l2">
  280. <a class="reference internal" href="../learning/sgd.html">
  281. Stochastic Gradient Descent (SGD)
  282. </a>
  283. </li>
  284. <li class="toctree-l2">
  285. <a class="reference internal" href="../learning/vb.html">
  286. Variational Bayes (VB)
  287. </a>
  288. </li>
  289. <li class="toctree-l2">
  290. <a class="reference internal" href="../learning/mcmc.html">
  291. Markov Chain Monte Carlo (MCMC)
  292. </a>
  293. </li>
  294. </ul>
  295. </li>
  296. <li class="toctree-l1">
  297. <a class="reference internal" href="../tracking/tracking_index.html">
  298. Multi-target tracking
  299. </a>
  300. </li>
  301. <li class="toctree-l1">
  302. <a class="reference internal" href="../ensemble/ensemble_index.html">
  303. Data assimilation using Ensemble Kalman filter
  304. </a>
  305. </li>
  306. <li class="toctree-l1">
  307. <a class="reference internal" href="../bnp/bnp_index.html">
  308. Bayesian non-parametric SSMs
  309. </a>
  310. </li>
  311. <li class="toctree-l1">
  312. <a class="reference internal" href="../changepoint/changepoint_index.html">
  313. Changepoint detection
  314. </a>
  315. </li>
  316. <li class="toctree-l1">
  317. <a class="reference internal" href="../timeseries/timeseries_index.html">
  318. Timeseries forecasting
  319. </a>
  320. </li>
  321. <li class="toctree-l1">
  322. <a class="reference internal" href="../gp/gp_index.html">
  323. Markovian Gaussian processes
  324. </a>
  325. </li>
  326. <li class="toctree-l1">
  327. <a class="reference internal" href="../ode/ode_index.html">
  328. Differential equations and SSMs
  329. </a>
  330. </li>
  331. <li class="toctree-l1">
  332. <a class="reference internal" href="../control/control_index.html">
  333. Optimal control
  334. </a>
  335. </li>
  336. <li class="toctree-l1">
  337. <a class="reference internal" href="../../bib.html">
  338. Bibliography
  339. </a>
  340. </li>
  341. </ul>
  342. </div>
  343. </nav> <!-- To handle the deprecated key -->
  344. <div class="navbar_extra_footer">
  345. Powered by <a href="https://jupyterbook.org">Jupyter Book</a>
  346. </div>
  347. </div>
  348. <main class="col py-md-3 pl-md-4 bd-content overflow-auto" role="main">
  349. <div class="topbar container-xl fixed-top">
  350. <div class="topbar-contents row">
  351. <div class="col-12 col-md-3 bd-topbar-whitespace site-navigation show"></div>
  352. <div class="col pl-md-4 topbar-main">
  353. <button id="navbar-toggler" class="navbar-toggler ml-0" type="button" data-toggle="collapse"
  354. data-toggle="tooltip" data-placement="bottom" data-target=".site-navigation" aria-controls="navbar-menu"
  355. aria-expanded="true" aria-label="Toggle navigation" aria-controls="site-navigation"
  356. title="Toggle navigation" data-toggle="tooltip" data-placement="left">
  357. <i class="fas fa-bars"></i>
  358. <i class="fas fa-arrow-left"></i>
  359. <i class="fas fa-arrow-up"></i>
  360. </button>
  361. <div class="dropdown-buttons-trigger">
  362. <button id="dropdown-buttons-trigger" class="btn btn-secondary topbarbtn" aria-label="Download this page"><i
  363. class="fas fa-download"></i></button>
  364. <div class="dropdown-buttons">
  365. <!-- ipynb file if we had a myst markdown file -->
  366. <!-- Download raw file -->
  367. <a class="dropdown-buttons" href="../../_sources/chapters/ssm/ssm_intro.ipynb"><button type="button"
  368. class="btn btn-secondary topbarbtn" title="Download source file" data-toggle="tooltip"
  369. data-placement="left">.ipynb</button></a>
  370. <!-- Download PDF via print -->
  371. <button type="button" id="download-print" class="btn btn-secondary topbarbtn" title="Print to PDF"
  372. onclick="printPdf(this)" data-toggle="tooltip" data-placement="left">.pdf</button>
  373. </div>
  374. </div>
  375. <!-- Source interaction buttons -->
  376. <div class="dropdown-buttons-trigger">
  377. <button id="dropdown-buttons-trigger" class="btn btn-secondary topbarbtn"
  378. aria-label="Connect with source repository"><i class="fab fa-github"></i></button>
  379. <div class="dropdown-buttons sourcebuttons">
  380. <a class="repository-button"
  381. href="https://github.com/probml/ssm-book"><button type="button" class="btn btn-secondary topbarbtn"
  382. data-toggle="tooltip" data-placement="left" title="Source repository"><i
  383. class="fab fa-github"></i>repository</button></a>
  384. <a class="issues-button"
  385. href="https://github.com/probml/ssm-book/issues/new?title=Issue%20on%20page%20%2Fchapters/ssm/ssm_intro.html&body=Your%20issue%20content%20here."><button
  386. type="button" class="btn btn-secondary topbarbtn" data-toggle="tooltip" data-placement="left"
  387. title="Open an issue"><i class="fas fa-lightbulb"></i>open issue</button></a>
  388. </div>
  389. </div>
  390. <!-- Full screen (wrap in <a> to have style consistency -->
  391. <a class="full-screen-button"><button type="button" class="btn btn-secondary topbarbtn" data-toggle="tooltip"
  392. data-placement="bottom" onclick="toggleFullScreen()" aria-label="Fullscreen mode"
  393. title="Fullscreen mode"><i
  394. class="fas fa-expand"></i></button></a>
  395. <!-- Launch buttons -->
  396. <div class="dropdown-buttons-trigger">
  397. <button id="dropdown-buttons-trigger" class="btn btn-secondary topbarbtn"
  398. aria-label="Launch interactive content"><i class="fas fa-rocket"></i></button>
  399. <div class="dropdown-buttons">
  400. <a class="binder-button" href="https://mybinder.org/v2/gh/probml/ssm-book/main?urlpath=tree/chapters/ssm/ssm_intro.ipynb"><button type="button"
  401. class="btn btn-secondary topbarbtn" title="Launch Binder" data-toggle="tooltip"
  402. data-placement="left"><img class="binder-button-logo"
  403. src="../../_static/images/logo_binder.svg"
  404. alt="Interact on binder">Binder</button></a>
  405. <a class="colab-button" href="https://colab.research.google.com/github/probml/ssm-book/blob/main/chapters/ssm/ssm_intro.ipynb"><button type="button" class="btn btn-secondary topbarbtn"
  406. title="Launch Colab" data-toggle="tooltip" data-placement="left"><img class="colab-button-logo"
  407. src="../../_static/images/logo_colab.png"
  408. alt="Interact on Colab">Colab</button></a>
  409. </div>
  410. </div>
  411. </div>
  412. <!-- Table of contents -->
  413. <div class="d-none d-md-block col-md-2 bd-toc show noprint">
  414. </div>
  415. </div>
  416. </div>
  417. <div id="main-content" class="row">
  418. <div class="col-12 col-md-9 pl-md-3 pr-md-0">
  419. <!-- Table of contents that is only displayed when printing the page -->
  420. <div id="jb-print-docs-body" class="onlyprint">
  421. <h1>What are State Space Models?</h1>
  422. <!-- Table of contents -->
  423. <div id="print-main-content">
  424. <div id="jb-print-toc">
  425. </div>
  426. </div>
  427. </div>
  428. <div>
  429. <div class="math notranslate nohighlight">
  430. \[ \begin{align}\begin{aligned}\newcommand\floor[1]{\lfloor#1\rfloor}\\\newcommand{\real}{\mathbb{R}}\\% Numbers
  431. \newcommand{\vzero}{\boldsymbol{0}}
  432. \newcommand{\vone}{\boldsymbol{1}}\\% Greek https://www.latex-tutorial.com/symbols/greek-alphabet/
  433. \newcommand{\valpha}{\boldsymbol{\alpha}}
  434. \newcommand{\vbeta}{\boldsymbol{\beta}}
  435. \newcommand{\vchi}{\boldsymbol{\chi}}
  436. \newcommand{\vdelta}{\boldsymbol{\delta}}
  437. \newcommand{\vDelta}{\boldsymbol{\Delta}}
  438. \newcommand{\vepsilon}{\boldsymbol{\epsilon}}
  439. \newcommand{\vzeta}{\boldsymbol{\zeta}}
  440. \newcommand{\vXi}{\boldsymbol{\Xi}}
  441. \newcommand{\vell}{\boldsymbol{\ell}}
  442. \newcommand{\veta}{\boldsymbol{\eta}}
  443. %\newcommand{\vEta}{\boldsymbol{\Eta}}
  444. \newcommand{\vgamma}{\boldsymbol{\gamma}}
  445. \newcommand{\vGamma}{\boldsymbol{\Gamma}}
  446. \newcommand{\vmu}{\boldsymbol{\mu}}
  447. \newcommand{\vmut}{\boldsymbol{\tilde{\mu}}}
  448. \newcommand{\vnu}{\boldsymbol{\nu}}
  449. \newcommand{\vkappa}{\boldsymbol{\kappa}}
  450. \newcommand{\vlambda}{\boldsymbol{\lambda}}
  451. \newcommand{\vLambda}{\boldsymbol{\Lambda}}
  452. \newcommand{\vLambdaBar}{\overline{\vLambda}}
  453. %\newcommand{\vnu}{\boldsymbol{\nu}}
  454. \newcommand{\vomega}{\boldsymbol{\omega}}
  455. \newcommand{\vOmega}{\boldsymbol{\Omega}}
  456. \newcommand{\vphi}{\boldsymbol{\phi}}
  457. \newcommand{\vvarphi}{\boldsymbol{\varphi}}
  458. \newcommand{\vPhi}{\boldsymbol{\Phi}}
  459. \newcommand{\vpi}{\boldsymbol{\pi}}
  460. \newcommand{\vPi}{\boldsymbol{\Pi}}
  461. \newcommand{\vpsi}{\boldsymbol{\psi}}
  462. \newcommand{\vPsi}{\boldsymbol{\Psi}}
  463. \newcommand{\vrho}{\boldsymbol{\rho}}
  464. \newcommand{\vtheta}{\boldsymbol{\theta}}
  465. \newcommand{\vthetat}{\boldsymbol{\tilde{\theta}}}
  466. \newcommand{\vTheta}{\boldsymbol{\Theta}}
  467. \newcommand{\vsigma}{\boldsymbol{\sigma}}
  468. \newcommand{\vSigma}{\boldsymbol{\Sigma}}
  469. \newcommand{\vSigmat}{\boldsymbol{\tilde{\Sigma}}}
  470. \newcommand{\vsigmoid}{\vsigma}
  471. \newcommand{\vtau}{\boldsymbol{\tau}}
  472. \newcommand{\vxi}{\boldsymbol{\xi}}\\
  473. % Lower Roman (Vectors)
  474. \newcommand{\va}{\mathbf{a}}
  475. \newcommand{\vb}{\mathbf{b}}
  476. \newcommand{\vBt}{\mathbf{\tilde{B}}}
  477. \newcommand{\vc}{\mathbf{c}}
  478. \newcommand{\vct}{\mathbf{\tilde{c}}}
  479. \newcommand{\vd}{\mathbf{d}}
  480. \newcommand{\ve}{\mathbf{e}}
  481. \newcommand{\vf}{\mathbf{f}}
  482. \newcommand{\vg}{\mathbf{g}}
  483. \newcommand{\vh}{\mathbf{h}}
  484. %\newcommand{\myvh}{\mathbf{h}}
  485. \newcommand{\vi}{\mathbf{i}}
  486. \newcommand{\vj}{\mathbf{j}}
  487. \newcommand{\vk}{\mathbf{k}}
  488. \newcommand{\vl}{\mathbf{l}}
  489. \newcommand{\vm}{\mathbf{m}}
  490. \newcommand{\vn}{\mathbf{n}}
  491. \newcommand{\vo}{\mathbf{o}}
  492. \newcommand{\vp}{\mathbf{p}}
  493. \newcommand{\vq}{\mathbf{q}}
  494. \newcommand{\vr}{\mathbf{r}}
  495. \newcommand{\vs}{\mathbf{s}}
  496. \newcommand{\vt}{\mathbf{t}}
  497. \newcommand{\vu}{\mathbf{u}}
  498. \newcommand{\vv}{\mathbf{v}}
  499. \newcommand{\vw}{\mathbf{w}}
  500. \newcommand{\vws}{\vw_s}
  501. \newcommand{\vwt}{\mathbf{\tilde{w}}}
  502. \newcommand{\vWt}{\mathbf{\tilde{W}}}
  503. \newcommand{\vwh}{\hat{\vw}}
  504. \newcommand{\vx}{\mathbf{x}}
  505. %\newcommand{\vx}{\mathbf{x}}
  506. \newcommand{\vxt}{\mathbf{\tilde{x}}}
  507. \newcommand{\vy}{\mathbf{y}}
  508. \newcommand{\vyt}{\mathbf{\tilde{y}}}
  509. \newcommand{\vz}{\mathbf{z}}
  510. %\newcommand{\vzt}{\mathbf{\tilde{z}}}\\
  511. % Upper Roman (Matrices)
  512. \newcommand{\vA}{\mathbf{A}}
  513. \newcommand{\vB}{\mathbf{B}}
  514. \newcommand{\vC}{\mathbf{C}}
  515. \newcommand{\vD}{\mathbf{D}}
  516. \newcommand{\vE}{\mathbf{E}}
  517. \newcommand{\vF}{\mathbf{F}}
  518. \newcommand{\vG}{\mathbf{G}}
  519. \newcommand{\vH}{\mathbf{H}}
  520. \newcommand{\vI}{\mathbf{I}}
  521. \newcommand{\vJ}{\mathbf{J}}
  522. \newcommand{\vK}{\mathbf{K}}
  523. \newcommand{\vL}{\mathbf{L}}
  524. \newcommand{\vM}{\mathbf{M}}
  525. \newcommand{\vMt}{\mathbf{\tilde{M}}}
  526. \newcommand{\vN}{\mathbf{N}}
  527. \newcommand{\vO}{\mathbf{O}}
  528. \newcommand{\vP}{\mathbf{P}}
  529. \newcommand{\vQ}{\mathbf{Q}}
  530. \newcommand{\vR}{\mathbf{R}}
  531. \newcommand{\vS}{\mathbf{S}}
  532. \newcommand{\vT}{\mathbf{T}}
  533. \newcommand{\vU}{\mathbf{U}}
  534. \newcommand{\vV}{\mathbf{V}}
  535. \newcommand{\vW}{\mathbf{W}}
  536. \newcommand{\vX}{\mathbf{X}}
  537. %\newcommand{\vXs}{\vX_{\vs}}
  538. \newcommand{\vXs}{\vX_{s}}
  539. \newcommand{\vXt}{\mathbf{\tilde{X}}}
  540. \newcommand{\vY}{\mathbf{Y}}
  541. \newcommand{\vZ}{\mathbf{Z}}
  542. \newcommand{\vZt}{\mathbf{\tilde{Z}}}
  543. \newcommand{\vzt}{\mathbf{\tilde{z}}}\\
  544. %%%%
  545. \newcommand{\hidden}{\vz}
  546. \newcommand{\hid}{\hidden}
  547. \newcommand{\observed}{\vy}
  548. \newcommand{\obs}{\observed}
  549. \newcommand{\inputs}{\vu}
  550. \newcommand{\input}{\inputs}\\\newcommand{\hmmTrans}{\vA}
  551. \newcommand{\hmmObs}{\vB}
  552. \newcommand{\hmmInit}{\vpi}
  553. \newcommand{\hmmhid}{\hidden}
  554. \newcommand{\hmmobs}{\obs}\\\newcommand{\ldsDyn}{\vA}
  555. \newcommand{\ldsObs}{\vC}
  556. \newcommand{\ldsDynIn}{\vB}
  557. \newcommand{\ldsObsIn}{\vD}
  558. \newcommand{\ldsDynNoise}{\vQ}
  559. \newcommand{\ldsObsNoise}{\vR}\\\newcommand{\ssmDynFn}{f}
  560. \newcommand{\ssmObsFn}{h}\\
  561. %%%
  562. \newcommand{\gauss}{\mathcal{N}}\\\newcommand{\diag}{\mathrm{diag}}\end{aligned}\end{align} \]</div>
  563. <div class="tex2jax_ignore mathjax_ignore section" id="what-are-state-space-models">
  564. <span id="sec-ssm-intro"></span><h1>What are State Space Models?<a class="headerlink" href="#what-are-state-space-models" title="Permalink to this headline">¶</a></h1>
  565. <p>A state space model or SSM
  566. is a partially observed Markov model,
  567. in which the hidden state, <span class="math notranslate nohighlight">\(\hidden_t\)</span>,
  568. evolves over time according to a Markov process,
  569. possibly conditional on external inputs or controls <span class="math notranslate nohighlight">\(\input_t\)</span>,
  570. and each hidden state generates some
  571. observations <span class="math notranslate nohighlight">\(\obs_t\)</span> at each time step.
  572. (In this book, we mostly focus on discrete time systems,
  573. although we consider the continuous-time case in XXX.)
  574. We get to see the observations, but not the hidden state.
  575. Our main goal is to infer the hidden state given the observations.
  576. However, we can also use the model to predict future observations,
  577. by first predicting future hidden states, and then predicting
  578. what observations they might generate.
  579. By using a hidden state <span class="math notranslate nohighlight">\(\hidden_t\)</span>
  580. to represent the past observations, <span class="math notranslate nohighlight">\(\obs_{1:t-1}\)</span>,
  581. the model can have ``infinite’’ memory,
  582. unlike a standard Markov model.</p>
  583. <div class="figure align-default" id="fig-ssm-ar">
  584. <a class="reference internal image-reference" href="../../_images/SSM-AR-inputs.png"><img alt="../../_images/SSM-AR-inputs.png" src="../../_images/SSM-AR-inputs.png" style="height: 300px;" /></a>
  585. <p class="caption"><span class="caption-number">Fig. 3 </span><span class="caption-text">Illustration of an SSM as a graphical model.</span><a class="headerlink" href="#fig-ssm-ar" title="Permalink to this image">¶</a></p>
  586. </div>
  587. <p>Formally we can define an SSM
  588. as the following joint distribution:</p>
  589. <div class="math notranslate nohighlight" id="equation-eq-ssm-ar">
  590. <span class="eqno">(2)<a class="headerlink" href="#equation-eq-ssm-ar" title="Permalink to this equation">¶</a></span>\[p(\hmmobs_{1:T},\hmmhid_{1:T}|\inputs_{1:T})
  591. = \left[ p(\hmmhid_1|\inputs_1) \prod_{t=2}^{T}
  592. p(\hmmhid_t|\hmmhid_{t-1},\inputs_t) \right]
  593. \left[ \prod_{t=1}^T p(\hmmobs_t|\hmmhid_t, \inputs_t, \hmmobs_{t-1}) \right]\]</div>
  594. <p>where <span class="math notranslate nohighlight">\(p(\hmmhid_t|\hmmhid_{t-1},\inputs_t)\)</span> is the
  595. transition model,
  596. <span class="math notranslate nohighlight">\(p(\hmmobs_t|\hmmhid_t, \inputs_t, \hmmobs_{t-1})\)</span> is the
  597. observation model,
  598. and <span class="math notranslate nohighlight">\(\inputs_{t}\)</span> is an optional input or action.
  599. See <a class="reference internal" href="#fig-ssm-ar"><span class="std std-numref">Fig. 3</span></a>
  600. for an illustration of the corresponding graphical model.</p>
  601. <p>We often consider a simpler setting in which the
  602. observations are conditionally independent of each other
  603. (rather than having Markovian dependencies) given the hidden state.
  604. In this case the joint simplifies to</p>
  605. <div class="math notranslate nohighlight" id="equation-eq-ssm-input">
  606. <span class="eqno">(3)<a class="headerlink" href="#equation-eq-ssm-input" title="Permalink to this equation">¶</a></span>\[p(\hmmobs_{1:T},\hmmhid_{1:T}|\inputs_{1:T})
  607. = \left[ p(\hmmhid_1|\inputs_1) \prod_{t=2}^{T}
  608. p(\hmmhid_t|\hmmhid_{t-1},\inputs_t) \right]
  609. \left[ \prod_{t=1}^T p(\hmmobs_t|\hmmhid_t, \inputs_t) \right]\]</div>
  610. <p>Sometimes there are no external inputs, so the model further
  611. simplifies to the following unconditional generative model:</p>
  612. <div class="math notranslate nohighlight" id="equation-eq-ssm-no-input">
  613. <span class="eqno">(4)<a class="headerlink" href="#equation-eq-ssm-no-input" title="Permalink to this equation">¶</a></span>\[p(\hmmobs_{1:T},\hmmhid_{1:T})
  614. = \left[ p(\hmmhid_1) \prod_{t=2}^{T}
  615. p(\hmmhid_t|\hmmhid_{t-1}) \right]
  616. \left[ \prod_{t=1}^T p(\hmmobs_t|\hmmhid_t) \right]\]</div>
  617. <p>See <a class="reference internal" href="#ssm-simplified"><span class="std std-numref">Fig. 4</span></a>
  618. for an illustration of the corresponding graphical model.</p>
  619. <div class="figure align-default" id="ssm-simplified">
  620. <a class="reference internal image-reference" href="../../_images/SSM-simplified.png"><img alt="../../_images/SSM-simplified.png" src="../../_images/SSM-simplified.png" style="width: 136.0px; height: 98.0px;" /></a>
  621. <p class="caption"><span class="caption-number">Fig. 4 </span><span class="caption-text">Illustration of a simplified SSM.</span><a class="headerlink" href="#ssm-simplified" title="Permalink to this image">¶</a></p>
  622. </div>
  623. </div>
  624. <script type="text/x-thebe-config">
  625. {
  626. requestKernel: true,
  627. binderOptions: {
  628. repo: "binder-examples/jupyter-stacks-datascience",
  629. ref: "master",
  630. },
  631. codeMirrorConfig: {
  632. theme: "abcdef",
  633. mode: "python"
  634. },
  635. kernelOptions: {
  636. kernelName: "python3",
  637. path: "./chapters/ssm"
  638. },
  639. predefinedOutput: true
  640. }
  641. </script>
  642. <script>kernelName = 'python3'</script>
  643. </div>
  644. <!-- Previous / next buttons -->
  645. <div class='prev-next-area'>
  646. <a class='left-prev' id="prev-link" href="ssm_index.html" title="previous page">
  647. <i class="fas fa-angle-left"></i>
  648. <div class="prev-next-info">
  649. <p class="prev-next-subtitle">previous</p>
  650. <p class="prev-next-title">State Space Models</p>
  651. </div>
  652. </a>
  653. <a class='right-next' id="next-link" href="hmm.html" title="next page">
  654. <div class="prev-next-info">
  655. <p class="prev-next-subtitle">next</p>
  656. <p class="prev-next-title">Hidden Markov Models</p>
  657. </div>
  658. <i class="fas fa-angle-right"></i>
  659. </a>
  660. </div>
  661. </div>
  662. </div>
  663. <footer class="footer">
  664. <p>
  665. By Kevin Murphy, Scott Linderman, et al.<br/>
  666. &copy; Copyright 2021.<br/>
  667. </p>
  668. </footer>
  669. </main>
  670. </div>
  671. </div>
  672. <script src="../../_static/js/index.be7d3bbb2ef33a8344ce.js"></script>
  673. </body>
  674. </html>