├── .gitignore ├── LICENSE ├── README.md ├── _build ├── .doctrees │ ├── README.doctree │ ├── bib.doctree │ ├── chapters │ │ ├── adf │ │ │ └── adf_index.doctree │ │ ├── blank.doctree │ │ ├── changepoint │ │ │ └── changepoint_index.doctree │ │ ├── control │ │ │ └── control_index.doctree │ │ ├── ensemble │ │ │ └── ensemble_index.doctree │ │ ├── extended │ │ │ ├── extended_filter.doctree │ │ │ ├── extended_index.doctree │ │ │ ├── extended_parallel.doctree │ │ │ └── extended_smoother.doctree │ │ ├── gp │ │ │ └── gp_index.doctree │ │ ├── hmm-chap.doctree │ │ ├── hmm-chap │ │ │ ├── casino.doctree │ │ │ ├── hmm-intro.doctree │ │ │ └── index.doctree │ │ ├── hmm │ │ │ ├── casino.doctree │ │ │ ├── hmm.doctree │ │ │ ├── hmm_discrete_numpy.doctree │ │ │ ├── hmm_examples.doctree │ │ │ ├── hmm_filter.doctree │ │ │ ├── hmm_index.doctree │ │ │ ├── hmm_parallel.doctree │ │ │ ├── hmm_sampling.doctree │ │ │ ├── hmm_smoother.doctree │ │ │ ├── hmm_viterbi.doctree │ │ │ ├── index.doctree │ │ │ └── intro.doctree │ │ ├── imports.doctree │ │ ├── intro-chap.doctree │ │ ├── intro.doctree │ │ ├── intro │ │ │ ├── appl.doctree │ │ │ └── intro.doctree │ │ ├── learning │ │ │ ├── em.doctree │ │ │ ├── learning_index.doctree │ │ │ ├── mcmc.doctree │ │ │ ├── sgd.doctree │ │ │ └── vb.doctree │ │ ├── lgssm-chap.doctree │ │ ├── lgssm.doctree │ │ ├── lgssm │ │ │ ├── index.doctree │ │ │ ├── intro.doctree │ │ │ ├── kalman_filter.doctree │ │ │ ├── kalman_parallel.doctree │ │ │ ├── kalman_sampling.doctree │ │ │ ├── kalman_smoother.doctree │ │ │ └── lgssm_index.doctree │ │ ├── ode │ │ │ └── ode_index.doctree │ │ ├── pf │ │ │ └── pf_index.doctree │ │ ├── postlin │ │ │ └── postlin_index.doctree │ │ ├── quadrature │ │ │ └── quadrature_index.doctree │ │ ├── refs.doctree │ │ ├── scratch.doctree │ │ ├── smc │ │ │ └── smc_index.doctree │ │ ├── ssm │ │ │ ├── deep.doctree │ │ │ ├── hmm.doctree │ │ │ ├── hsmm.doctree │ │ │ ├── index.doctree │ │ │ ├── lgssm.doctree │ │ │ ├── nongauss.doctree │ │ │ ├── nonlin.doctree │ │ │ ├── rnn.doctree │ │ │ ├── ssm_examples.doctree │ │ │ ├── ssm_index.doctree │ │ │ └── switching.doctree │ │ ├── template.doctree │ │ ├── timeseries │ │ │ └── timeseries_index.doctree │ │ ├── tracking │ │ │ └── tracking_index.doctree │ │ ├── unscented │ │ │ ├── unscented_filter.doctree │ │ │ ├── unscented_index.doctree │ │ │ └── unscented_smoother.doctree │ │ └── vi │ │ │ └── vi_index.doctree │ ├── environment.pickle │ ├── glue_cache.json │ ├── intro.doctree │ ├── kevin.doctree │ ├── markdown-notebooks.doctree │ ├── markdown.doctree │ ├── mymarkdownfile.doctree │ ├── notebooks.doctree │ └── root.doctree ├── html │ ├── .buildinfo │ ├── README.html │ ├── _images │ │ ├── casino.pdf │ │ ├── casino.png │ │ ├── cat_dog.jpg │ │ ├── intro-chap_2_0.png │ │ ├── intro_2_0.png │ │ ├── kevin_2_0.png │ │ ├── markdown-notebooks_4_0.png │ │ ├── notebooks_2_0.png │ │ └── scratch_2_0.png │ ├── _panels_static │ │ ├── panels-main.c949a650a448cc0ae9fd3441c0e17fb0.css │ │ └── panels-variables.06eb56fa6e07937060861dad626602ad.css │ ├── _sources │ │ ├── README.md │ │ ├── bib.md │ │ ├── chapters │ │ │ ├── adf │ │ │ │ └── adf_index.md │ │ │ ├── blank.ipynb │ │ │ ├── changepoint │ │ │ │ └── changepoint_index.md │ │ │ ├── control │ │ │ │ └── control_index.md │ │ │ ├── ensemble │ │ │ │ └── ensemble_index.md │ │ │ ├── extended │ │ │ │ ├── extended_filter.ipynb │ │ │ │ ├── extended_index.md │ │ │ │ ├── extended_parallel.ipynb │ │ │ │ └── extended_smoother.ipynb │ │ │ ├── gp │ │ │ │ └── gp_index.md │ │ │ ├── hmm-chap.md │ │ │ ├── hmm-chap │ │ │ │ ├── casino.md │ │ │ │ ├── hmm-intro.md │ │ │ │ └── index.md │ │ │ ├── hmm │ │ │ │ ├── casino.md │ │ │ │ ├── hmm.md │ │ │ │ ├── hmm_discrete_numpy.ipynb │ │ │ │ ├── hmm_examples.ipynb │ │ │ │ ├── hmm_filter.ipynb │ │ │ │ ├── hmm_index.md │ │ │ │ ├── hmm_parallel.ipynb │ │ │ │ ├── hmm_sampling.ipynb │ │ │ │ ├── hmm_smoother.ipynb │ │ │ │ ├── hmm_viterbi.ipynb │ │ │ │ ├── index.md │ │ │ │ └── intro.md │ │ │ ├── imports.ipynb │ │ │ ├── intro-chap.ipynb │ │ │ ├── intro-chap.md │ │ │ ├── intro.ipynb │ │ │ ├── intro.md │ │ │ ├── intro │ │ │ │ ├── appl.md │ │ │ │ └── intro.md │ │ │ ├── learning │ │ │ │ ├── em.ipynb │ │ │ │ ├── learning_index.md │ │ │ │ ├── mcmc.ipynb │ │ │ │ ├── sgd.ipynb │ │ │ │ └── vb.ipynb │ │ │ ├── lgssm-chap.ipynb │ │ │ ├── lgssm-chap.md │ │ │ ├── lgssm.ipynb │ │ │ ├── lgssm.md │ │ │ ├── lgssm │ │ │ │ ├── index.md │ │ │ │ ├── intro.md │ │ │ │ ├── kalman_filter.ipynb │ │ │ │ ├── kalman_parallel.ipynb │ │ │ │ ├── kalman_sampling.ipynb │ │ │ │ ├── kalman_smoother.ipynb │ │ │ │ └── lgssm_index.md │ │ │ ├── ode │ │ │ │ └── ode_index.md │ │ │ ├── pf │ │ │ │ └── pf_index.md │ │ │ ├── postlin │ │ │ │ └── postlin_index.md │ │ │ ├── quadrature │ │ │ │ └── quadrature_index.md │ │ │ ├── refs.md │ │ │ ├── scratch.ipynb │ │ │ ├── scratch.md │ │ │ ├── smc │ │ │ │ └── smc_index.md │ │ │ ├── ssm │ │ │ │ ├── deep.ipynb │ │ │ │ ├── hmm.ipynb │ │ │ │ ├── hsmm.ipynb │ │ │ │ ├── index.md │ │ │ │ ├── lgssm.ipynb │ │ │ │ ├── nongauss.ipynb │ │ │ │ ├── nonlin.ipynb │ │ │ │ ├── rnn.ipynb │ │ │ │ ├── ssm_examples.ipynb │ │ │ │ ├── ssm_index.md │ │ │ │ └── switching.ipynb │ │ │ ├── template.ipynb │ │ │ ├── timeseries │ │ │ │ └── timeseries_index.md │ │ │ ├── tracking │ │ │ │ └── tracking_index.md │ │ │ ├── unscented │ │ │ │ ├── unscented_filter.ipynb │ │ │ │ ├── unscented_index.md │ │ │ │ └── unscented_smoother.ipynb │ │ │ └── vi │ │ │ │ └── vi_index.md │ │ ├── intro.md │ │ ├── kevin.ipynb │ │ ├── kevin.md │ │ ├── markdown-notebooks.ipynb │ │ ├── markdown-notebooks.md │ │ ├── markdown.md │ │ ├── mymarkdownfile.md │ │ ├── notebooks.ipynb │ │ └── root.md │ ├── _static │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ └── __init__.cpython-38.pyc │ │ ├── basic.css │ │ ├── check-solid.svg │ │ ├── clipboard.min.js │ │ ├── copy-button.svg │ │ ├── copybutton.css │ │ ├── copybutton.js │ │ ├── copybutton_funcs.js │ │ ├── css │ │ │ ├── blank.css │ │ │ ├── index.ff1ffe594081f20da1ef19478df9384b.css │ │ │ └── theme.css │ │ ├── doctools.js │ │ ├── documentation_options.js │ │ ├── file.png │ │ ├── images │ │ │ ├── logo_binder.svg │ │ │ ├── logo_colab.png │ │ │ └── logo_jupyterhub.svg │ │ ├── jquery-3.5.1.js │ │ ├── jquery.js │ │ ├── js │ │ │ └── index.be7d3bbb2ef33a8344ce.js │ │ ├── language_data.js │ │ ├── logo.png │ │ ├── minus.png │ │ ├── mystnb.css │ │ ├── panels-main.c949a650a448cc0ae9fd3441c0e17fb0.css │ │ ├── panels-variables.06eb56fa6e07937060861dad626602ad.css │ │ ├── plus.png │ │ ├── pygments.css │ │ ├── searchtools.js │ │ ├── sphinx-book-theme.css │ │ ├── sphinx-book-theme.d59cb220de22ca1c485ebbdc042f0030.js │ │ ├── sphinx-book-theme.e2363ea40746bee74734a24ffefccd78.css │ │ ├── sphinx-thebe.css │ │ ├── sphinx-thebe.js │ │ ├── togglebutton.css │ │ ├── togglebutton.js │ │ ├── underscore-1.13.1.js │ │ ├── underscore-1.3.1.js │ │ ├── underscore.js │ │ ├── vendor │ │ │ └── fontawesome │ │ │ │ └── 5.13.0 │ │ │ │ ├── LICENSE.txt │ │ │ │ ├── css │ │ │ │ └── all.min.css │ │ │ │ └── webfonts │ │ │ │ ├── fa-brands-400.eot │ │ │ │ ├── fa-brands-400.svg │ │ │ │ ├── fa-brands-400.ttf │ │ │ │ ├── fa-brands-400.woff │ │ │ │ ├── fa-brands-400.woff2 │ │ │ │ ├── fa-regular-400.eot │ │ │ │ ├── fa-regular-400.svg │ │ │ │ ├── fa-regular-400.ttf │ │ │ │ ├── fa-regular-400.woff │ │ │ │ ├── fa-regular-400.woff2 │ │ │ │ ├── fa-solid-900.eot │ │ │ │ ├── fa-solid-900.svg │ │ │ │ ├── fa-solid-900.ttf │ │ │ │ ├── fa-solid-900.woff │ │ │ │ └── fa-solid-900.woff2 │ │ └── webpack-macros.html │ ├── bib.html │ ├── chapters │ │ ├── adf │ │ │ └── adf_index.html │ │ ├── blank.html │ │ ├── changepoint │ │ │ └── changepoint_index.html │ │ ├── control │ │ │ └── control_index.html │ │ ├── ensemble │ │ │ └── ensemble_index.html │ │ ├── extended │ │ │ ├── extended_filter.html │ │ │ ├── extended_index.html │ │ │ ├── extended_parallel.html │ │ │ └── extended_smoother.html │ │ ├── gp │ │ │ └── gp_index.html │ │ ├── hmm-chap.html │ │ ├── hmm-chap │ │ │ ├── casino.html │ │ │ ├── hmm-intro.html │ │ │ └── index.html │ │ ├── hmm │ │ │ ├── casino.html │ │ │ ├── hmm.html │ │ │ ├── hmm_discrete_numpy.html │ │ │ ├── hmm_examples.html │ │ │ ├── hmm_filter.html │ │ │ ├── hmm_index.html │ │ │ ├── hmm_parallel.html │ │ │ ├── hmm_sampling.html │ │ │ ├── hmm_smoother.html │ │ │ ├── hmm_viterbi.html │ │ │ ├── index.html │ │ │ └── intro.html │ │ ├── imports.html │ │ ├── intro-chap.html │ │ ├── intro.html │ │ ├── intro │ │ │ ├── appl.html │ │ │ └── intro.html │ │ ├── learning │ │ │ ├── em.html │ │ │ ├── learning_index.html │ │ │ ├── mcmc.html │ │ │ ├── sgd.html │ │ │ └── vb.html │ │ ├── lgssm-chap.html │ │ ├── lgssm.html │ │ ├── lgssm │ │ │ ├── index.html │ │ │ ├── intro.html │ │ │ ├── kalman_filter.html │ │ │ ├── kalman_parallel.html │ │ │ ├── kalman_sampling.html │ │ │ ├── kalman_smoother.html │ │ │ └── lgssm_index.html │ │ ├── ode │ │ │ └── ode_index.html │ │ ├── pf │ │ │ └── pf_index.html │ │ ├── postlin │ │ │ └── postlin_index.html │ │ ├── quadrature │ │ │ └── quadrature_index.html │ │ ├── refs.html │ │ ├── scratch.html │ │ ├── smc │ │ │ └── smc_index.html │ │ ├── ssm │ │ │ ├── deep.html │ │ │ ├── hmm.html │ │ │ ├── hsmm.html │ │ │ ├── index.html │ │ │ ├── lgssm.html │ │ │ ├── nongauss.html │ │ │ ├── nonlin.html │ │ │ ├── rnn.html │ │ │ ├── ssm_examples.html │ │ │ ├── ssm_index.html │ │ │ └── switching.html │ │ ├── template.html │ │ ├── timeseries │ │ │ └── timeseries_index.html │ │ ├── tracking │ │ │ └── tracking_index.html │ │ ├── unscented │ │ │ ├── unscented_filter.html │ │ │ ├── unscented_index.html │ │ │ └── unscented_smoother.html │ │ └── vi │ │ │ └── vi_index.html │ ├── genindex.html │ ├── index.html │ ├── intro.html │ ├── kevin.html │ ├── markdown-notebooks.html │ ├── markdown.html │ ├── mymarkdownfile.html │ ├── notebooks.html │ ├── objects.inv │ ├── reports │ │ └── hmm.log │ ├── root.html │ ├── search.html │ └── searchindex.js └── jupyter_execute │ ├── chapters │ ├── blank.ipynb │ ├── blank.py │ ├── extended │ │ ├── extended_filter.ipynb │ │ ├── extended_filter.py │ │ ├── extended_parallel.ipynb │ │ ├── extended_parallel.py │ │ ├── extended_smoother.ipynb │ │ └── extended_smoother.py │ ├── hmm │ │ ├── hmm_discrete_numpy.ipynb │ │ ├── hmm_discrete_numpy.py │ │ ├── hmm_examples.ipynb │ │ ├── hmm_examples.py │ │ ├── hmm_filter.ipynb │ │ ├── hmm_filter.py │ │ ├── hmm_parallel.ipynb │ │ ├── hmm_parallel.py │ │ ├── hmm_sampling.ipynb │ │ ├── hmm_sampling.py │ │ ├── hmm_smoother.ipynb │ │ ├── hmm_smoother.py │ │ ├── hmm_viterbi.ipynb │ │ └── hmm_viterbi.py │ ├── imports.ipynb │ ├── imports.py │ ├── intro-chap.ipynb │ ├── intro-chap.py │ ├── intro-chap_2_0.png │ ├── intro.ipynb │ ├── intro.py │ ├── intro_2_0.png │ ├── learning │ │ ├── em.ipynb │ │ ├── em.py │ │ ├── mcmc.ipynb │ │ ├── mcmc.py │ │ ├── sgd.ipynb │ │ ├── sgd.py │ │ ├── vb.ipynb │ │ └── vb.py │ ├── lgssm-chap.ipynb │ ├── lgssm-chap.py │ ├── lgssm.ipynb │ ├── lgssm.py │ ├── lgssm │ │ ├── kalman_filter.ipynb │ │ ├── kalman_filter.py │ │ ├── kalman_parallel.ipynb │ │ ├── kalman_parallel.py │ │ ├── kalman_sampling.ipynb │ │ ├── kalman_sampling.py │ │ ├── kalman_smoother.ipynb │ │ └── kalman_smoother.py │ ├── scratch.ipynb │ ├── scratch.py │ ├── scratch_2_0.png │ ├── ssm │ │ ├── deep.ipynb │ │ ├── deep.py │ │ ├── hmm.ipynb │ │ ├── hmm.py │ │ ├── hsmm.ipynb │ │ ├── hsmm.py │ │ ├── lgssm.ipynb │ │ ├── lgssm.py │ │ ├── nongauss.ipynb │ │ ├── nongauss.py │ │ ├── nonlin.ipynb │ │ ├── nonlin.py │ │ ├── rnn.ipynb │ │ ├── rnn.py │ │ ├── ssm_examples.ipynb │ │ ├── ssm_examples.py │ │ ├── switching.ipynb │ │ └── switching.py │ ├── template.ipynb │ ├── template.py │ └── unscented │ │ ├── unscented_filter.ipynb │ │ ├── unscented_filter.py │ │ ├── unscented_smoother.ipynb │ │ └── unscented_smoother.py │ ├── kevin.ipynb │ ├── kevin.py │ ├── kevin_2_0.png │ ├── markdown-notebooks.ipynb │ ├── markdown-notebooks.py │ ├── markdown-notebooks_4_0.png │ ├── notebooks.ipynb │ ├── notebooks.py │ └── notebooks_2_0.png ├── _config.yml ├── _toc.yml ├── bib.md ├── chapters ├── adf │ └── adf_index.md ├── blank.ipynb ├── bnp │ └── bnp_index.md ├── changepoint │ └── changepoint_index.md ├── control │ └── control_index.md ├── ensemble │ └── ensemble_index.md ├── extended │ ├── extended_filter.ipynb │ ├── extended_index.md │ ├── extended_parallel.ipynb │ └── extended_smoother.ipynb ├── gp │ └── gp_index.md ├── hmm │ ├── .ipynb_checkpoints │ │ └── hmm_discrete_numpy-checkpoint.ipynb │ ├── hmm_filter.ipynb │ ├── hmm_index.md │ ├── hmm_parallel.ipynb │ ├── hmm_sampling.ipynb │ ├── hmm_smoother.ipynb │ └── hmm_viterbi.ipynb ├── learning │ ├── em.ipynb │ ├── learning_index.md │ ├── mcmc.ipynb │ ├── sgd.ipynb │ └── vb.ipynb ├── lgssm │ ├── kalman_filter.ipynb │ ├── kalman_parallel.ipynb │ ├── kalman_sampling.ipynb │ ├── kalman_smoother.ipynb │ └── lgssm_index.md ├── ode │ └── ode_index.md ├── pf │ └── pf_index.md ├── postlin │ └── postlin_index.md ├── quadrature │ └── quadrature_index.md ├── scratch.md ├── smc │ └── smc_index.md ├── ssm │ ├── deep.ipynb │ ├── hmm.ipynb │ ├── hsmm.ipynb │ ├── lgssm.ipynb │ ├── nongauss.ipynb │ ├── nonlin.ipynb │ ├── rnn.ipynb │ ├── ssm_index.md │ └── switching.ipynb ├── timeseries │ └── timeseries_index.md ├── tracking │ └── tracking_index.md ├── unscented │ ├── unscented_filter.ipynb │ ├── unscented_index.md │ └── unscented_smoother.ipynb └── vi │ └── vi_index.md ├── figures ├── casino.pdf ├── casino.png └── cat_dog.jpg ├── references.bib ├── requirements.txt └── root.md /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 ssm-jax 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ssm-book 2 | Interactive textbook on state space models. 3 | The rendered content can be found at [https://ssm-jax.github.io/ssm-book/root.html](https://ssm-jax.github.io/ssm-book/root.html). 4 | -------------------------------------------------------------------------------- /_build/.doctrees/README.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/README.doctree -------------------------------------------------------------------------------- /_build/.doctrees/bib.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/bib.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/adf/adf_index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/adf/adf_index.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/blank.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/blank.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/changepoint/changepoint_index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/changepoint/changepoint_index.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/control/control_index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/control/control_index.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/ensemble/ensemble_index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/ensemble/ensemble_index.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/extended/extended_filter.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/extended/extended_filter.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/extended/extended_index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/extended/extended_index.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/extended/extended_parallel.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/extended/extended_parallel.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/extended/extended_smoother.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/extended/extended_smoother.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/gp/gp_index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/gp/gp_index.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/hmm-chap.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/hmm-chap.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/hmm-chap/casino.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/hmm-chap/casino.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/hmm-chap/hmm-intro.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/hmm-chap/hmm-intro.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/hmm-chap/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/hmm-chap/index.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/hmm/casino.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/hmm/casino.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/hmm/hmm.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/hmm/hmm.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/hmm/hmm_discrete_numpy.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/hmm/hmm_discrete_numpy.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/hmm/hmm_examples.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/hmm/hmm_examples.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/hmm/hmm_filter.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/hmm/hmm_filter.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/hmm/hmm_index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/hmm/hmm_index.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/hmm/hmm_parallel.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/hmm/hmm_parallel.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/hmm/hmm_sampling.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/hmm/hmm_sampling.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/hmm/hmm_smoother.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/hmm/hmm_smoother.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/hmm/hmm_viterbi.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/hmm/hmm_viterbi.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/hmm/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/hmm/index.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/hmm/intro.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/hmm/intro.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/imports.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/imports.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/intro-chap.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/intro-chap.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/intro.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/intro.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/intro/appl.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/intro/appl.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/intro/intro.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/intro/intro.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/learning/em.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/learning/em.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/learning/learning_index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/learning/learning_index.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/learning/mcmc.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/learning/mcmc.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/learning/sgd.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/learning/sgd.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/learning/vb.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/learning/vb.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/lgssm-chap.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/lgssm-chap.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/lgssm.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/lgssm.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/lgssm/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/lgssm/index.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/lgssm/intro.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/lgssm/intro.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/lgssm/kalman_filter.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/lgssm/kalman_filter.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/lgssm/kalman_parallel.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/lgssm/kalman_parallel.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/lgssm/kalman_sampling.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/lgssm/kalman_sampling.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/lgssm/kalman_smoother.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/lgssm/kalman_smoother.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/lgssm/lgssm_index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/lgssm/lgssm_index.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/ode/ode_index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/ode/ode_index.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/pf/pf_index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/pf/pf_index.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/postlin/postlin_index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/postlin/postlin_index.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/quadrature/quadrature_index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/quadrature/quadrature_index.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/refs.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/refs.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/scratch.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/scratch.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/smc/smc_index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/smc/smc_index.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/ssm/deep.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/ssm/deep.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/ssm/hmm.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/ssm/hmm.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/ssm/hsmm.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/ssm/hsmm.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/ssm/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/ssm/index.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/ssm/lgssm.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/ssm/lgssm.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/ssm/nongauss.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/ssm/nongauss.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/ssm/nonlin.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/ssm/nonlin.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/ssm/rnn.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/ssm/rnn.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/ssm/ssm_examples.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/ssm/ssm_examples.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/ssm/ssm_index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/ssm/ssm_index.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/ssm/switching.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/ssm/switching.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/template.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/template.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/timeseries/timeseries_index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/timeseries/timeseries_index.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/tracking/tracking_index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/tracking/tracking_index.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/unscented/unscented_filter.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/unscented/unscented_filter.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/unscented/unscented_index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/unscented/unscented_index.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/unscented/unscented_smoother.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/unscented/unscented_smoother.doctree -------------------------------------------------------------------------------- /_build/.doctrees/chapters/vi/vi_index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/chapters/vi/vi_index.doctree -------------------------------------------------------------------------------- /_build/.doctrees/environment.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/environment.pickle -------------------------------------------------------------------------------- /_build/.doctrees/glue_cache.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /_build/.doctrees/intro.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/intro.doctree -------------------------------------------------------------------------------- /_build/.doctrees/kevin.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/kevin.doctree -------------------------------------------------------------------------------- /_build/.doctrees/markdown-notebooks.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/markdown-notebooks.doctree -------------------------------------------------------------------------------- /_build/.doctrees/markdown.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/markdown.doctree -------------------------------------------------------------------------------- /_build/.doctrees/mymarkdownfile.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/mymarkdownfile.doctree -------------------------------------------------------------------------------- /_build/.doctrees/notebooks.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/notebooks.doctree -------------------------------------------------------------------------------- /_build/.doctrees/root.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/.doctrees/root.doctree -------------------------------------------------------------------------------- /_build/html/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: c5a2310bf13978b00c67ecd28add61e0 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /_build/html/_images/casino.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_images/casino.pdf -------------------------------------------------------------------------------- /_build/html/_images/casino.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_images/casino.png -------------------------------------------------------------------------------- /_build/html/_images/cat_dog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_images/cat_dog.jpg -------------------------------------------------------------------------------- /_build/html/_images/intro-chap_2_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_images/intro-chap_2_0.png -------------------------------------------------------------------------------- /_build/html/_images/intro_2_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_images/intro_2_0.png -------------------------------------------------------------------------------- /_build/html/_images/kevin_2_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_images/kevin_2_0.png -------------------------------------------------------------------------------- /_build/html/_images/markdown-notebooks_4_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_images/markdown-notebooks_4_0.png -------------------------------------------------------------------------------- /_build/html/_images/notebooks_2_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_images/notebooks_2_0.png -------------------------------------------------------------------------------- /_build/html/_images/scratch_2_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_images/scratch_2_0.png -------------------------------------------------------------------------------- /_build/html/_panels_static/panels-main.c949a650a448cc0ae9fd3441c0e17fb0.css: -------------------------------------------------------------------------------- 1 | details.dropdown .summary-title{padding-right:3em !important;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none}details.dropdown:hover{cursor:pointer}details.dropdown .summary-content{cursor:default}details.dropdown summary{list-style:none;padding:1em}details.dropdown summary .octicon.no-title{vertical-align:middle}details.dropdown[open] summary .octicon.no-title{visibility:hidden}details.dropdown summary::-webkit-details-marker{display:none}details.dropdown summary:focus{outline:none}details.dropdown summary:hover .summary-up svg,details.dropdown summary:hover .summary-down svg{opacity:1}details.dropdown .summary-up svg,details.dropdown .summary-down svg{display:block;opacity:.6}details.dropdown .summary-up,details.dropdown .summary-down{pointer-events:none;position:absolute;right:1em;top:.75em}details.dropdown[open] .summary-down{visibility:hidden}details.dropdown:not([open]) .summary-up{visibility:hidden}details.dropdown.fade-in[open] summary~*{-moz-animation:panels-fade-in .5s ease-in-out;-webkit-animation:panels-fade-in .5s ease-in-out;animation:panels-fade-in .5s ease-in-out}details.dropdown.fade-in-slide-down[open] summary~*{-moz-animation:panels-fade-in .5s ease-in-out, panels-slide-down .5s ease-in-out;-webkit-animation:panels-fade-in .5s ease-in-out, panels-slide-down .5s ease-in-out;animation:panels-fade-in .5s ease-in-out, panels-slide-down .5s ease-in-out}@keyframes panels-fade-in{0%{opacity:0}100%{opacity:1}}@keyframes panels-slide-down{0%{transform:translate(0, -10px)}100%{transform:translate(0, 0)}}.octicon{display:inline-block;fill:currentColor;vertical-align:text-top}.tabbed-content{box-shadow:0 -.0625rem var(--tabs-color-overline),0 .0625rem var(--tabs-color-underline);display:none;order:99;padding-bottom:.75rem;padding-top:.75rem;width:100%}.tabbed-content>:first-child{margin-top:0 !important}.tabbed-content>:last-child{margin-bottom:0 !important}.tabbed-content>.tabbed-set{margin:0}.tabbed-set{border-radius:.125rem;display:flex;flex-wrap:wrap;margin:1em 0;position:relative}.tabbed-set>input{opacity:0;position:absolute}.tabbed-set>input:checked+label{border-color:var(--tabs-color-label-active);color:var(--tabs-color-label-active)}.tabbed-set>input:checked+label+.tabbed-content{display:block}.tabbed-set>input:focus+label{outline-style:auto}.tabbed-set>input:not(.focus-visible)+label{outline:none;-webkit-tap-highlight-color:transparent}.tabbed-set>label{border-bottom:.125rem solid transparent;color:var(--tabs-color-label-inactive);cursor:pointer;font-size:var(--tabs-size-label);font-weight:700;padding:1em 1.25em .5em;transition:color 250ms;width:auto;z-index:1}html .tabbed-set>label:hover{color:var(--tabs-color-label-active)} 2 | -------------------------------------------------------------------------------- /_build/html/_panels_static/panels-variables.06eb56fa6e07937060861dad626602ad.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --tabs-color-label-active: hsla(231, 99%, 66%, 1); 3 | --tabs-color-label-inactive: rgba(178, 206, 245, 0.62); 4 | --tabs-color-overline: rgb(207, 236, 238); 5 | --tabs-color-underline: rgb(207, 236, 238); 6 | --tabs-size-label: 1rem; 7 | } -------------------------------------------------------------------------------- /_build/html/_sources/README.md: -------------------------------------------------------------------------------- 1 | # ssm-book 2 | Interactive textbook on state space models. 3 | The rendered content can be found at [https://ssm-jax.github.io/ssm-book/root.html](https://ssm-jax.github.io/ssm-book/root.html). 4 | -------------------------------------------------------------------------------- /_build/html/_sources/bib.md: -------------------------------------------------------------------------------- 1 | # Bibliography 2 | 3 | 4 | ```{bibliography} 5 | ``` 6 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/adf/adf_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:ADF)= 4 | # Assumed Density Filtering 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/blank.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Viterbi algorithm\n" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } 33 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/changepoint/changepoint_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:changepoint)= 4 | # Changepoint detection 5 | 6 | 7 | 8 | {cite}`Agudelo-Espana2020`, {cite}`Adams2007`, {cite}`Fearnhead04`, {cite}`Fearnhead06`, {cite}`Fearnhead07`, 9 | {cite}`Fearnhead11` 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/control/control_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:control)= 4 | # Optimal control 5 | 6 | 7 | {cite}`Botvinick2012`, {cite}`Kappen2012`, {cite}`Rawlik2012` 8 | 9 | ## LQR 10 | 11 | ## MPC 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/ensemble/ensemble_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:ensemble)= 4 | # Data assimilation using Ensemble Kalman filter 5 | 6 | 7 | {cite}`Evensen2009`, {cite}`Roth2017enkf` 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/extended/extended_filter.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Extended Kalman filtering" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } 33 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/extended/extended_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:extended)= 4 | # Extended (linearized) methods 5 | 6 | ```{tableofcontents} 7 | ``` -------------------------------------------------------------------------------- /_build/html/_sources/chapters/extended/extended_parallel.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Parallel extended Kalman smoothing\n", 8 | "\n", 9 | "{cite}`Sarkka2020icassp`\n" 10 | ] 11 | } 12 | ], 13 | "metadata": { 14 | "kernelspec": { 15 | "display_name": "Python 3", 16 | "language": "python", 17 | "name": "python3" 18 | }, 19 | "language_info": { 20 | "codemirror_mode": { 21 | "name": "ipython", 22 | "version": 3 23 | }, 24 | "file_extension": ".py", 25 | "mimetype": "text/x-python", 26 | "name": "python", 27 | "nbconvert_exporter": "python", 28 | "pygments_lexer": "ipython3", 29 | "version": "3.8.5" 30 | } 31 | }, 32 | "nbformat": 4, 33 | "nbformat_minor": 4 34 | } 35 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/extended/extended_smoother.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Extended Kalman smoother" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } 33 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/gp/gp_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:GP)= 4 | # Markovian Gaussian processes 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/hmm-chap.md: -------------------------------------------------------------------------------- 1 | (ch:hmm)= 2 | # Hidden Markov Models (HMM) 3 | 4 | In this chapter, we discuss HMMs. 5 | 6 | 7 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/hmm-chap/casino.md: -------------------------------------------------------------------------------- 1 | # The occasionally dishonest casino 2 | 3 | See {cite}`Durbin98`. 4 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/hmm-chap/hmm-intro.md: -------------------------------------------------------------------------------- 1 | # What are HMMs? 2 | 3 | Hidden Markov Models are ... -------------------------------------------------------------------------------- /_build/html/_sources/chapters/hmm-chap/index.md: -------------------------------------------------------------------------------- 1 | (ch:hmm)= 2 | # HMMs index 3 | 4 | This chapter covers HMMs. 5 | See sections below. -------------------------------------------------------------------------------- /_build/html/_sources/chapters/hmm/casino.md: -------------------------------------------------------------------------------- 1 | (sec:casino)= 2 | # The occasionally dishonest casino 3 | 4 | See {cite}`Durbin98`. 5 | 6 | 7 | 8 | ```{figure} /figures/casino.png 9 | :scale: 50% 10 | :name: casino 11 | 12 | Illustration of the casino HMM. 13 | ``` 14 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/hmm/hmm.md: -------------------------------------------------------------------------------- 1 | # Hidden Markov Models (HMM) 2 | 3 | Foo 4 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/hmm/hmm_examples.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Some example HMMs\n" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 60, 13 | "metadata": {}, 14 | "outputs": [], 15 | "source": [ 16 | "{\n", 17 | " \"tags\": [\n", 18 | " \"hide-input\",\n", 19 | " ]\n", 20 | "}\n", 21 | "\n", 22 | "# Install necessary libraries\n", 23 | "\n", 24 | "try:\n", 25 | " import jax\n", 26 | "except:\n", 27 | " # For cuda version, see https://github.com/google/jax#installation\n", 28 | " %pip install --upgrade \"jax[cpu]\" \n", 29 | " import jax\n", 30 | "\n", 31 | "try:\n", 32 | " import jsl\n", 33 | "except:\n", 34 | " %pip install git+https://github.com/probml/jsl\n", 35 | " import jsl\n", 36 | "\n", 37 | "try:\n", 38 | " import rich\n", 39 | "except:\n", 40 | " %pip install rich\n", 41 | " import rich" 42 | ] 43 | }, 44 | { 45 | "cell_type": "code", 46 | "execution_count": 61, 47 | "metadata": {}, 48 | "outputs": [], 49 | "source": [ 50 | "import abc\n", 51 | "from dataclasses import dataclass\n", 52 | "import functools\n", 53 | "import itertools\n", 54 | "\n", 55 | "from typing import Any, Callable, NamedTuple, Optional, Union, Tuple\n", 56 | "\n", 57 | "\n", 58 | "import jax\n", 59 | "import jax.numpy as jnp\n", 60 | "import matplotlib.pyplot as plt\n", 61 | "import numpy as np\n", 62 | "\n", 63 | "import inspect\n", 64 | "import inspect as py_inspect\n", 65 | "\n", 66 | "from rich import inspect as r_inspect\n", 67 | "from rich import print as r_print\n", 68 | "\n", 69 | "def print_source(fname):\n", 70 | " r_print(py_inspect.getsource(fname))" 71 | ] 72 | } 73 | ], 74 | "metadata": { 75 | "kernelspec": { 76 | "display_name": "Python 3", 77 | "language": "python", 78 | "name": "python3" 79 | }, 80 | "language_info": { 81 | "codemirror_mode": { 82 | "name": "ipython", 83 | "version": 3 84 | }, 85 | "file_extension": ".py", 86 | "mimetype": "text/x-python", 87 | "name": "python", 88 | "nbconvert_exporter": "python", 89 | "pygments_lexer": "ipython3", 90 | "version": "3.8.5" 91 | } 92 | }, 93 | "nbformat": 4, 94 | "nbformat_minor": 4 95 | } 96 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/hmm/hmm_filter.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# HMM filtering (forwards algorithm)\n" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } 33 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/hmm/hmm_index.md: -------------------------------------------------------------------------------- 1 | (ch:hmm)= 2 | # Inference in discrete SSMs 3 | 4 | This chapter covers inference in HMMs. 5 | 6 | 7 | ```{tableofcontents} 8 | ``` 9 | 10 | See (sec:casino-ex). 11 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/hmm/hmm_parallel.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Parallel HMM smoothing\n", 8 | "\n", 9 | "{cite}`Hassan2021`\n", 10 | "\n", 11 | "\n" 12 | ] 13 | } 14 | ], 15 | "metadata": { 16 | "kernelspec": { 17 | "display_name": "Python 3", 18 | "language": "python", 19 | "name": "python3" 20 | }, 21 | "language_info": { 22 | "codemirror_mode": { 23 | "name": "ipython", 24 | "version": 3 25 | }, 26 | "file_extension": ".py", 27 | "mimetype": "text/x-python", 28 | "name": "python", 29 | "nbconvert_exporter": "python", 30 | "pygments_lexer": "ipython3", 31 | "version": "3.8.5" 32 | } 33 | }, 34 | "nbformat": 4, 35 | "nbformat_minor": 4 36 | } 37 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/hmm/hmm_sampling.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Forwards-filtering backwards-sampling algorithm\n" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } 33 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/hmm/hmm_smoother.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# HMM smoothing (forwards-backwards algorithm)\n" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "## Forwards filter, backwards smoother algorithm" 15 | ] 16 | }, 17 | { 18 | "cell_type": "markdown", 19 | "metadata": {}, 20 | "source": [ 21 | "## Two-filter algorithm" 22 | ] 23 | }, 24 | { 25 | "cell_type": "markdown", 26 | "metadata": {}, 27 | "source": [] 28 | } 29 | ], 30 | "metadata": { 31 | "kernelspec": { 32 | "display_name": "Python 3", 33 | "language": "python", 34 | "name": "python3" 35 | }, 36 | "language_info": { 37 | "codemirror_mode": { 38 | "name": "ipython", 39 | "version": 3 40 | }, 41 | "file_extension": ".py", 42 | "mimetype": "text/x-python", 43 | "name": "python", 44 | "nbconvert_exporter": "python", 45 | "pygments_lexer": "ipython3", 46 | "version": "3.8.5" 47 | } 48 | }, 49 | "nbformat": 4, 50 | "nbformat_minor": 4 51 | } 52 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/hmm/hmm_viterbi.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Viterbi algorithm\n" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } 33 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/hmm/index.md: -------------------------------------------------------------------------------- 1 | (ch:hmm)= 2 | # Inference in discrete SSMs 3 | 4 | This chapter covers HMMs. 5 | See sections below. 6 | 7 | ```{tableofcontents} 8 | ``` 9 | 10 | 11 | ## What are HMMs? 12 | 13 | (sec:casino)= 14 | ### Example with discrete observations: casino HMM 15 | 16 | See {cite}`Durbin98`. 17 | 18 | 19 | 20 | ```{figure} /figures/casino.png 21 | :scale: 50% 22 | :name: casino 23 | 24 | Illustration of the casino HMM. 25 | ``` 26 | 27 | 28 | ### Example with Gaussian observations: lillypad HMM 29 | 30 | 31 | ## Forwards algorithm 32 | 33 | ## Backwards algorithm 34 | 35 | ### Backwards smoothing variant 36 | 37 | ### Backwards filtering variant 38 | 39 | 40 | ## Viterbi algorithm 41 | 42 | ## Forwards-filtering, backwards-sampling 43 | 44 | ## Parallel scan algorithms 45 | 46 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/hmm/intro.md: -------------------------------------------------------------------------------- 1 | # What are HMMs? 2 | 3 | Hidden Markov Models are ... -------------------------------------------------------------------------------- /_build/html/_sources/chapters/intro-chap.md: -------------------------------------------------------------------------------- 1 | --- 2 | jupytext: 3 | cell_metadata_filter: -all 4 | formats: md:myst 5 | text_representation: 6 | extension: .md 7 | format_name: myst 8 | kernelspec: 9 | display_name: Python 3 10 | language: python 11 | name: python3 12 | --- 13 | 14 | (ch:intro)= 15 | # Introduction 16 | 17 | 18 | 19 | 20 | In this chapter, we do blah. 21 | Specifically 22 | 23 | - foo 24 | - bar. 25 | - baz 26 | 27 | For more details, see [](ch:hmm) 28 | and [HMM chapter](ch:hmm) 29 | and {ref}`ch:hmm` 30 | and {cite}`Sarkka13`. 31 | 32 | 33 | ## What are state space models? 34 | 35 | ## Python 36 | 37 | We\'re now ready to start coding. 38 | 39 | ```{code-cell} 40 | from matplotlib import rcParams, cycler 41 | import matplotlib.pyplot as plt 42 | import numpy as np 43 | plt.ion() 44 | ``` 45 | 46 | ```{code-cell} 47 | # Fixing random state for reproducibility 48 | np.random.seed(19680801) 49 | 50 | N = 10 51 | data = [np.logspace(0, 1, 100) + np.random.randn(100) + ii for ii in range(N)] 52 | data = np.array(data).T 53 | cmap = plt.cm.coolwarm 54 | rcParams['axes.prop_cycle'] = cycler(color=cmap(np.linspace(0, 1, N))) 55 | 56 | 57 | from matplotlib.lines import Line2D 58 | custom_lines = [Line2D([0], [0], color=cmap(0.), lw=4), 59 | Line2D([0], [0], color=cmap(.5), lw=4), 60 | Line2D([0], [0], color=cmap(1.), lw=4)] 61 | 62 | fig, ax = plt.subplots(figsize=(10, 5)) 63 | lines = ax.plot(data) 64 | ax.legend(custom_lines, ['Cold', 'Medium', 'Hot']); 65 | ``` 66 | 67 | ```{code-cell} 68 | import matplotlib.pyplot as plt 69 | import numpy as np 70 | import jax 71 | import jax.numpy as jnp 72 | 73 | print(jax.devices()) 74 | ``` 75 | 76 | ## Images 77 | 78 | 79 | ![](https://myst-parser.readthedocs.io/en/latest/_static/logo-wide.svg) 80 | 81 | 83 | 84 | ```{figure} /images/cat_dog.jpg 85 | :scale: 50% 86 | :name: cat_dog 87 | 88 | A photo of a cat and a dog. 89 | ``` 90 | 91 | ```{figure} /images/cat_dog.jpg 92 | :scale: 50% 93 | :name: cat_dog2 94 | 95 | Another photo of a cat and a dog. 96 | ``` 97 | 98 | In {numref}`Figure %s ` we show catdog. 99 | In {numref}`Figure %s ` we show catdog2, its twin. 100 | 101 | 102 | ## Math 103 | 104 | We have $E= mc^2$, and also 105 | 106 | ```{math} 107 | :label: foo 108 | a x^2 + bx+ c = 0 109 | ``` 110 | 111 | From {eq}`foo`, it follows that 112 | $$ 113 | \begin{align} 114 | 0 &= a x^2 + bx+ c \\ 115 | 0 &= a x^2 + bx+ c 116 | \end{align} 117 | $$ 118 | 119 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/intro.md: -------------------------------------------------------------------------------- 1 | --- 2 | jupytext: 3 | cell_metadata_filter: -all 4 | formats: md:myst 5 | text_representation: 6 | extension: .md 7 | format_name: myst 8 | kernelspec: 9 | display_name: Python 3 10 | language: python 11 | name: python3 12 | --- 13 | 14 | (ch:intro)= 15 | # Scratchpad 16 | 17 | 18 | In this chapter, we do blah. 19 | Specifically 20 | 21 | - foo 22 | - bar. 23 | - baz 24 | 25 | For more details, see 26 | {ref}`ch:hmm` and {cite}`Sarkka13`. 27 | 28 | 29 | ## Python 30 | 31 | We\'re now ready to start coding. 32 | 33 | ```{code-cell} 34 | from matplotlib import rcParams, cycler 35 | import matplotlib.pyplot as plt 36 | import numpy as np 37 | plt.ion() 38 | ``` 39 | 40 | ```{code-cell} 41 | # Fixing random state for reproducibility 42 | np.random.seed(19680801) 43 | 44 | N = 10 45 | data = [np.logspace(0, 1, 100) + np.random.randn(100) + ii for ii in range(N)] 46 | data = np.array(data).T 47 | cmap = plt.cm.coolwarm 48 | rcParams['axes.prop_cycle'] = cycler(color=cmap(np.linspace(0, 1, N))) 49 | 50 | 51 | from matplotlib.lines import Line2D 52 | custom_lines = [Line2D([0], [0], color=cmap(0.), lw=4), 53 | Line2D([0], [0], color=cmap(.5), lw=4), 54 | Line2D([0], [0], color=cmap(1.), lw=4)] 55 | 56 | fig, ax = plt.subplots(figsize=(10, 5)) 57 | lines = ax.plot(data) 58 | ax.legend(custom_lines, ['Cold', 'Medium', 'Hot']); 59 | ``` 60 | 61 | ```{code-cell} 62 | import matplotlib.pyplot as plt 63 | import numpy as np 64 | import jax 65 | import jax.numpy as jnp 66 | 67 | print(jax.devices()) 68 | ``` 69 | 70 | ## Images 71 | 72 | 73 | 80 | 81 | ```{figure} /figures/cat_dog.jpg 82 | :scale: 50% 83 | :name: cat_dog 84 | 85 | A photo of a cat and a dog. 86 | ``` 87 | 88 | ```{figure} /figures/cat_dog.jpg 89 | :scale: 50% 90 | :name: cat_dog2 91 | 92 | Another photo of a cat and a dog. 93 | ``` 94 | 95 | In {numref}`Figure %s ` we show catdog. 96 | In {numref}`Figure %s ` we show catdog2, its twin. 97 | 98 | 99 | ## Math 100 | 101 | We have $E= mc^2$, and also 102 | 103 | ```{math} 104 | :label: foo 105 | a x^2 + bx+ c = 0 106 | ``` 107 | 108 | From {eq}`foo`, it follows that 109 | 110 | $$ 111 | \begin{align} 112 | 0 &= a x^2 + bx+ c \\ 113 | 0 &= a x^2 + bx+ c 114 | \end{align} 115 | $$ 116 | 117 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/intro/appl.md: -------------------------------------------------------------------------------- 1 | # Applications 2 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/intro/intro.md: -------------------------------------------------------------------------------- 1 | # What are state space models? 2 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/learning/em.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "(sec:em)=\n", 8 | "# Expectation Maximization (EM)\n", 9 | "\n", 10 | "{cite}`Ghahramani96a`\n" 11 | ] 12 | } 13 | ], 14 | "metadata": { 15 | "kernelspec": { 16 | "display_name": "Python 3", 17 | "language": "python", 18 | "name": "python3" 19 | }, 20 | "language_info": { 21 | "codemirror_mode": { 22 | "name": "ipython", 23 | "version": 3 24 | }, 25 | "file_extension": ".py", 26 | "mimetype": "text/x-python", 27 | "name": "python", 28 | "nbconvert_exporter": "python", 29 | "pygments_lexer": "ipython3", 30 | "version": "3.8.8" 31 | } 32 | }, 33 | "nbformat": 4, 34 | "nbformat_minor": 4 35 | } 36 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/learning/learning_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:learning)= 4 | # Offline parameter estimation (learning) 5 | 6 | ```{tableofcontents} 7 | ``` 8 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/learning/mcmc.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "(sec:mcmc)=\n", 8 | "# Markov Chain Monte Carlo (MCMC)\n", 9 | "\n" 10 | ] 11 | } 12 | ], 13 | "metadata": { 14 | "kernelspec": { 15 | "display_name": "Python 3", 16 | "language": "python", 17 | "name": "python3" 18 | }, 19 | "language_info": { 20 | "codemirror_mode": { 21 | "name": "ipython", 22 | "version": 3 23 | }, 24 | "file_extension": ".py", 25 | "mimetype": "text/x-python", 26 | "name": "python", 27 | "nbconvert_exporter": "python", 28 | "pygments_lexer": "ipython3", 29 | "version": "3.8.8" 30 | } 31 | }, 32 | "nbformat": 4, 33 | "nbformat_minor": 4 34 | } 35 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/learning/sgd.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "(sec:sgd)=\n", 8 | "# Stochastic Gradient Descent (SGD)\n", 9 | "\n" 10 | ] 11 | } 12 | ], 13 | "metadata": { 14 | "kernelspec": { 15 | "display_name": "Python 3", 16 | "language": "python", 17 | "name": "python3" 18 | }, 19 | "language_info": { 20 | "codemirror_mode": { 21 | "name": "ipython", 22 | "version": 3 23 | }, 24 | "file_extension": ".py", 25 | "mimetype": "text/x-python", 26 | "name": "python", 27 | "nbconvert_exporter": "python", 28 | "pygments_lexer": "ipython3", 29 | "version": "3.8.8" 30 | } 31 | }, 32 | "nbformat": 4, 33 | "nbformat_minor": 4 34 | } 35 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/learning/vb.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "\n", 8 | "(sec:VB)=\n", 9 | "# Variational Bayes (VB)\n", 10 | "\n" 11 | ] 12 | } 13 | ], 14 | "metadata": { 15 | "kernelspec": { 16 | "display_name": "Python 3", 17 | "language": "python", 18 | "name": "python3" 19 | }, 20 | "language_info": { 21 | "codemirror_mode": { 22 | "name": "ipython", 23 | "version": 3 24 | }, 25 | "file_extension": ".py", 26 | "mimetype": "text/x-python", 27 | "name": "python", 28 | "nbconvert_exporter": "python", 29 | "pygments_lexer": "ipython3", 30 | "version": "3.8.8" 31 | } 32 | }, 33 | "nbformat": 4, 34 | "nbformat_minor": 4 35 | } 36 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/lgssm-chap.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Linear-Gaussian SSMs\n", 8 | "\n", 9 | "LG-SSM, aka LDS, are a workhorse..." 10 | ] 11 | } 12 | ], 13 | "metadata": { 14 | "jupytext": { 15 | "cell_metadata_filter": "-all", 16 | "formats": "md:myst", 17 | "text_representation": { 18 | "extension": ".md", 19 | "format_name": "myst", 20 | "format_version": 0.13, 21 | "jupytext_version": "1.11.5" 22 | } 23 | }, 24 | "kernelspec": { 25 | "display_name": "Python 3", 26 | "language": "python", 27 | "name": "python3" 28 | }, 29 | "language_info": { 30 | "codemirror_mode": { 31 | "name": "ipython", 32 | "version": 3 33 | }, 34 | "file_extension": ".py", 35 | "mimetype": "text/x-python", 36 | "name": "python", 37 | "nbconvert_exporter": "python", 38 | "pygments_lexer": "ipython3", 39 | "version": "3.8.5" 40 | }, 41 | "source_map": [ 42 | 14 43 | ] 44 | }, 45 | "nbformat": 4, 46 | "nbformat_minor": 4 47 | } -------------------------------------------------------------------------------- /_build/html/_sources/chapters/lgssm-chap.md: -------------------------------------------------------------------------------- 1 | --- 2 | jupytext: 3 | cell_metadata_filter: -all 4 | formats: md:myst 5 | text_representation: 6 | extension: .md 7 | format_name: myst 8 | format_version: 0.13 9 | jupytext_version: 1.11.5 10 | kernelspec: 11 | display_name: Python 3 12 | language: python 13 | name: python3 14 | --- 15 | 16 | # Linear-Gaussian SSMs 17 | 18 | LG-SSM, aka LDS, are a workhorse... 19 | 20 | 21 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/lgssm.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Linear-Gaussian SSMs\n", 8 | "\n", 9 | "## What are LG-SSMs?\n", 10 | "\n", 11 | "LG-SSM, aka LDS, are a workhorse...\n", 12 | "\n", 13 | "## Kalman filter\n", 14 | "\n", 15 | "## Kalman smoother" 16 | ] 17 | } 18 | ], 19 | "metadata": { 20 | "jupytext": { 21 | "cell_metadata_filter": "-all", 22 | "formats": "md:myst", 23 | "text_representation": { 24 | "extension": ".md", 25 | "format_name": "myst", 26 | "format_version": 0.13, 27 | "jupytext_version": "1.11.5" 28 | } 29 | }, 30 | "kernelspec": { 31 | "display_name": "Python 3", 32 | "language": "python", 33 | "name": "python3" 34 | }, 35 | "language_info": { 36 | "codemirror_mode": { 37 | "name": "ipython", 38 | "version": 3 39 | }, 40 | "file_extension": ".py", 41 | "mimetype": "text/x-python", 42 | "name": "python", 43 | "nbconvert_exporter": "python", 44 | "pygments_lexer": "ipython3", 45 | "version": "3.8.5" 46 | }, 47 | "source_map": [ 48 | 14 49 | ] 50 | }, 51 | "nbformat": 4, 52 | "nbformat_minor": 4 53 | } -------------------------------------------------------------------------------- /_build/html/_sources/chapters/lgssm.md: -------------------------------------------------------------------------------- 1 | --- 2 | jupytext: 3 | cell_metadata_filter: -all 4 | formats: md:myst 5 | text_representation: 6 | extension: .md 7 | format_name: myst 8 | format_version: 0.13 9 | jupytext_version: 1.11.5 10 | kernelspec: 11 | display_name: Python 3 12 | language: python 13 | name: python3 14 | --- 15 | 16 | # Linear-Gaussian SSMs 17 | 18 | ## What are LG-SSMs? 19 | 20 | LG-SSM, aka LDS, are a workhorse... 21 | 22 | ## Kalman filter 23 | 24 | ## Kalman smoother 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/lgssm/index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:lgssm)= 4 | # Inference in linear-Gaussian SSMs 5 | 6 | ```{tableofcontents} 7 | ``` -------------------------------------------------------------------------------- /_build/html/_sources/chapters/lgssm/intro.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:lgssm)= 4 | # Exact inference in linear-Gaussian SSMs 5 | 6 | 7 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/lgssm/kalman_filter.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Kalman filtering" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } 33 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/lgssm/kalman_parallel.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Parallel Kalman Smoother\n", 8 | "\n", 9 | "{cite}`Sarkka2021`\n", 10 | "\n", 11 | "\n", 12 | "\n" 13 | ] 14 | } 15 | ], 16 | "metadata": { 17 | "kernelspec": { 18 | "display_name": "Python 3", 19 | "language": "python", 20 | "name": "python3" 21 | }, 22 | "language_info": { 23 | "codemirror_mode": { 24 | "name": "ipython", 25 | "version": 3 26 | }, 27 | "file_extension": ".py", 28 | "mimetype": "text/x-python", 29 | "name": "python", 30 | "nbconvert_exporter": "python", 31 | "pygments_lexer": "ipython3", 32 | "version": "3.8.5" 33 | } 34 | }, 35 | "nbformat": 4, 36 | "nbformat_minor": 4 37 | } 38 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/lgssm/kalman_sampling.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Forwards-filtering backwards sampling" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } 33 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/lgssm/kalman_smoother.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Kalman (RTS) smoother" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } 33 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/lgssm/lgssm_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:lgssm)= 4 | # Inference in linear-Gaussian SSMs 5 | 6 | ```{tableofcontents} 7 | ``` -------------------------------------------------------------------------------- /_build/html/_sources/chapters/ode/ode_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:ODE)= 4 | # Differential equations and SSMs 5 | 6 | 7 | {cite}`Tronarp2019`, {cite}`Sarkka2019book`, {cite}`HennigBook` 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/pf/pf_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:PF)= 4 | # Particle filtering 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/postlin/postlin_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:postlin)= 4 | # Posterior linearization 5 | 6 | 7 | {cite}`Garcia-Fernandez2017`, {cite}`Tronarp2018`, {cite}`Garcia-Fernandez2019` 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/quadrature/quadrature_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:quadrature)= 4 | # Quadrature and cubature methods 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/refs.md: -------------------------------------------------------------------------------- 1 | # Bibliography 2 | 3 | 4 | ```{bibliography} 5 | ``` 6 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/scratch.md: -------------------------------------------------------------------------------- 1 | --- 2 | jupytext: 3 | cell_metadata_filter: -all 4 | formats: md:myst 5 | text_representation: 6 | extension: .md 7 | format_name: myst 8 | kernelspec: 9 | display_name: Python 3 10 | language: python 11 | name: python3 12 | --- 13 | 14 | (ch:intro)= 15 | # Scratchpad 16 | 17 | 18 | In this chapter, we do blah. 19 | Specifically 20 | 21 | - foo 22 | - bar. 23 | - baz 24 | 25 | For more details, see 26 | {ref}`ch:hmm` and {cite}`Sarkka13`. 27 | 28 | 29 | ## Python 30 | 31 | We\'re now ready to start coding. 32 | 33 | ```{code-cell} 34 | from matplotlib import rcParams, cycler 35 | import matplotlib.pyplot as plt 36 | import numpy as np 37 | plt.ion() 38 | ``` 39 | 40 | ```{code-cell} 41 | # Fixing random state for reproducibility 42 | np.random.seed(19680801) 43 | 44 | N = 10 45 | data = [np.logspace(0, 1, 100) + np.random.randn(100) + ii for ii in range(N)] 46 | data = np.array(data).T 47 | cmap = plt.cm.coolwarm 48 | rcParams['axes.prop_cycle'] = cycler(color=cmap(np.linspace(0, 1, N))) 49 | 50 | 51 | from matplotlib.lines import Line2D 52 | custom_lines = [Line2D([0], [0], color=cmap(0.), lw=4), 53 | Line2D([0], [0], color=cmap(.5), lw=4), 54 | Line2D([0], [0], color=cmap(1.), lw=4)] 55 | 56 | fig, ax = plt.subplots(figsize=(10, 5)) 57 | lines = ax.plot(data) 58 | ax.legend(custom_lines, ['Cold', 'Medium', 'Hot']); 59 | ``` 60 | 61 | ```{code-cell} 62 | import matplotlib.pyplot as plt 63 | import numpy as np 64 | import jax 65 | import jax.numpy as jnp 66 | 67 | print(jax.devices()) 68 | ``` 69 | 70 | ## Images 71 | 72 | 73 | 80 | 81 | ```{figure} /figures/cat_dog.jpg 82 | :scale: 50% 83 | :name: cat_dog 84 | 85 | A photo of a cat and a dog. 86 | ``` 87 | 88 | ```{figure} /figures/cat_dog.jpg 89 | :scale: 50% 90 | :name: cat_dog2 91 | 92 | Another photo of a cat and a dog. 93 | ``` 94 | 95 | In {numref}`Figure %s ` we show catdog. 96 | In {numref}`Figure %s ` we show catdog2, its twin. 97 | 98 | 99 | ## Math 100 | 101 | We have $E= mc^2$, and also 102 | 103 | ```{math} 104 | :label: foo 105 | a x^2 + bx+ c = 0 106 | ``` 107 | 108 | From {eq}`foo`, it follows that 109 | 110 | $$ 111 | \begin{align} 112 | 0 &= a x^2 + bx+ c \\ 113 | 0 &= a x^2 + bx+ c 114 | \end{align} 115 | $$ 116 | 117 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/smc/smc_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:SMC)= 4 | # Sequential Monte Carlo 5 | 6 | {cite}`Chopin2020` 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/ssm/deep.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Deep SSMs\n" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [] 14 | } 15 | ], 16 | "metadata": { 17 | "kernelspec": { 18 | "display_name": "Python 3", 19 | "language": "python", 20 | "name": "python3" 21 | }, 22 | "language_info": { 23 | "codemirror_mode": { 24 | "name": "ipython", 25 | "version": 3 26 | }, 27 | "file_extension": ".py", 28 | "mimetype": "text/x-python", 29 | "name": "python", 30 | "nbconvert_exporter": "python", 31 | "pygments_lexer": "ipython3", 32 | "version": "3.8.5" 33 | } 34 | }, 35 | "nbformat": 4, 36 | "nbformat_minor": 4 37 | } 38 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/ssm/hsmm.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Hidden Semi-Markov Models\n", 8 | "\n" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.8.5" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 4 33 | } 34 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/ssm/index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:ssm)= 4 | # Introduction 5 | 6 | ```{tableofcontents} 7 | ``` 8 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/ssm/lgssm.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Linear Gaussian SSMs\n" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [] 14 | } 15 | ], 16 | "metadata": { 17 | "kernelspec": { 18 | "display_name": "Python 3", 19 | "language": "python", 20 | "name": "python3" 21 | }, 22 | "language_info": { 23 | "codemirror_mode": { 24 | "name": "ipython", 25 | "version": 3 26 | }, 27 | "file_extension": ".py", 28 | "mimetype": "text/x-python", 29 | "name": "python", 30 | "nbconvert_exporter": "python", 31 | "pygments_lexer": "ipython3", 32 | "version": "3.8.5" 33 | } 34 | }, 35 | "nbformat": 4, 36 | "nbformat_minor": 4 37 | } 38 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/ssm/nongauss.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Non-Gaussian SSMs\n" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [] 14 | } 15 | ], 16 | "metadata": { 17 | "kernelspec": { 18 | "display_name": "Python 3", 19 | "language": "python", 20 | "name": "python3" 21 | }, 22 | "language_info": { 23 | "codemirror_mode": { 24 | "name": "ipython", 25 | "version": 3 26 | }, 27 | "file_extension": ".py", 28 | "mimetype": "text/x-python", 29 | "name": "python", 30 | "nbconvert_exporter": "python", 31 | "pygments_lexer": "ipython3", 32 | "version": "3.8.5" 33 | } 34 | }, 35 | "nbformat": 4, 36 | "nbformat_minor": 4 37 | } 38 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/ssm/nonlin.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Non-Linear Gaussian SSMs\n" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } 33 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/ssm/rnn.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Recurrent Neural Networks\n" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [] 14 | } 15 | ], 16 | "metadata": { 17 | "kernelspec": { 18 | "display_name": "Python 3", 19 | "language": "python", 20 | "name": "python3" 21 | }, 22 | "language_info": { 23 | "codemirror_mode": { 24 | "name": "ipython", 25 | "version": 3 26 | }, 27 | "file_extension": ".py", 28 | "mimetype": "text/x-python", 29 | "name": "python", 30 | "nbconvert_exporter": "python", 31 | "pygments_lexer": "ipython3", 32 | "version": "3.8.5" 33 | } 34 | }, 35 | "nbformat": 4, 36 | "nbformat_minor": 4 37 | } 38 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/ssm/ssm_examples.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Boilerplate" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 60, 13 | "metadata": {}, 14 | "outputs": [], 15 | "source": [ 16 | "# Install necessary libraries\n", 17 | "\n", 18 | "try:\n", 19 | " import jax\n", 20 | "except:\n", 21 | " # For cuda version, see https://github.com/google/jax#installation\n", 22 | " %pip install --upgrade \"jax[cpu]\" \n", 23 | " import jax\n", 24 | "\n", 25 | "try:\n", 26 | " import jsl\n", 27 | "except:\n", 28 | " %pip install git+https://github.com/probml/jsl\n", 29 | " import jsl\n", 30 | "\n", 31 | "try:\n", 32 | " import rich\n", 33 | "except:\n", 34 | " %pip install rich\n", 35 | " import rich" 36 | ] 37 | }, 38 | { 39 | "cell_type": "code", 40 | "execution_count": 61, 41 | "metadata": {}, 42 | "outputs": [], 43 | "source": [ 44 | "# Import standrd libraries\n", 45 | "\n", 46 | "import abc\n", 47 | "from dataclasses import dataclass\n", 48 | "import functools\n", 49 | "import itertools\n", 50 | "\n", 51 | "from typing import Any, Callable, NamedTuple, Optional, Union, Tuple\n", 52 | "\n", 53 | "\n", 54 | "import jax\n", 55 | "import jax.numpy as jnp\n", 56 | "import matplotlib.pyplot as plt\n", 57 | "import numpy as np\n", 58 | "\n", 59 | "import inspect\n", 60 | "import inspect as py_inspect\n", 61 | "\n", 62 | "from rich import inspect as r_inspect\n", 63 | "from rich import print as r_print\n", 64 | "\n", 65 | "def print_source(fname):\n", 66 | " r_print(py_inspect.getsource(fname))" 67 | ] 68 | }, 69 | { 70 | "cell_type": "markdown", 71 | "metadata": {}, 72 | "source": [ 73 | "# Hidden Markov Models\n", 74 | "\n", 75 | "We first create the \"Ocassionally dishonest casino\" model from {cite}`Durbin98`.\n", 76 | "\n", 77 | "```{figure} /figures/casino.png\n", 78 | ":scale: 50%\n", 79 | ":name: casino\n", 80 | "\n", 81 | "Illustration of the casino HMM.\n", 82 | "```" 83 | ] 84 | } 85 | ], 86 | "metadata": { 87 | "kernelspec": { 88 | "display_name": "Python 3", 89 | "language": "python", 90 | "name": "python3" 91 | }, 92 | "language_info": { 93 | "codemirror_mode": { 94 | "name": "ipython", 95 | "version": 3 96 | }, 97 | "file_extension": ".py", 98 | "mimetype": "text/x-python", 99 | "name": "python", 100 | "nbconvert_exporter": "python", 101 | "pygments_lexer": "ipython3", 102 | "version": "3.8.5" 103 | } 104 | }, 105 | "nbformat": 4, 106 | "nbformat_minor": 4 107 | } 108 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/ssm/ssm_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:ssm)= 4 | # Introduction 5 | 6 | ```{tableofcontents} 7 | ``` 8 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/ssm/switching.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Switching SSMs\n" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "## Jump Markov Linear Dynamical Systems" 15 | ] 16 | }, 17 | { 18 | "cell_type": "markdown", 19 | "metadata": {}, 20 | "source": [] 21 | } 22 | ], 23 | "metadata": { 24 | "kernelspec": { 25 | "display_name": "Python 3", 26 | "language": "python", 27 | "name": "python3" 28 | }, 29 | "language_info": { 30 | "codemirror_mode": { 31 | "name": "ipython", 32 | "version": 3 33 | }, 34 | "file_extension": ".py", 35 | "mimetype": "text/x-python", 36 | "name": "python", 37 | "nbconvert_exporter": "python", 38 | "pygments_lexer": "ipython3", 39 | "version": "3.8.5" 40 | } 41 | }, 42 | "nbformat": 4, 43 | "nbformat_minor": 4 44 | } 45 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/template.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 60, 6 | "metadata": {}, 7 | "outputs": [], 8 | "source": [ 9 | "# Install necessary libraries\n", 10 | "\n", 11 | "try:\n", 12 | " import jax\n", 13 | "except:\n", 14 | " # For cuda version, see https://github.com/google/jax#installation\n", 15 | " %pip install --upgrade \"jax[cpu]\" \n", 16 | " import jax\n", 17 | "\n", 18 | "try:\n", 19 | " import jsl\n", 20 | "except:\n", 21 | " %pip install git+https://github.com/probml/jsl\n", 22 | " import jsl\n", 23 | "\n", 24 | "try:\n", 25 | " import rich\n", 26 | "except:\n", 27 | " %pip install rich\n", 28 | " import rich" 29 | ] 30 | }, 31 | { 32 | "cell_type": "code", 33 | "execution_count": 61, 34 | "metadata": {}, 35 | "outputs": [], 36 | "source": [ 37 | "# Import standrd libraries\n", 38 | "\n", 39 | "import abc\n", 40 | "from dataclasses import dataclass\n", 41 | "import functools\n", 42 | "import itertools\n", 43 | "\n", 44 | "from typing import Any, Callable, NamedTuple, Optional, Union, Tuple\n", 45 | "\n", 46 | "\n", 47 | "import jax\n", 48 | "import jax.numpy as jnp\n", 49 | "import matplotlib.pyplot as plt\n", 50 | "import numpy as np\n", 51 | "\n", 52 | "import inspect\n", 53 | "import inspect as py_inspect\n", 54 | "\n", 55 | "from rich import inspect as r_inspect\n", 56 | "from rich import print as r_print\n", 57 | "\n", 58 | "def print_source(fname):\n", 59 | " r_print(py_inspect.getsource(fname))" 60 | ] 61 | } 62 | ], 63 | "metadata": { 64 | "kernelspec": { 65 | "display_name": "Python 3", 66 | "language": "python", 67 | "name": "python3" 68 | }, 69 | "language_info": { 70 | "codemirror_mode": { 71 | "name": "ipython", 72 | "version": 3 73 | }, 74 | "file_extension": ".py", 75 | "mimetype": "text/x-python", 76 | "name": "python", 77 | "nbconvert_exporter": "python", 78 | "pygments_lexer": "ipython3", 79 | "version": "3.8.5" 80 | } 81 | }, 82 | "nbformat": 4, 83 | "nbformat_minor": 4 84 | } 85 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/timeseries/timeseries_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:timeseries)= 4 | # Timeseries forecasting 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/tracking/tracking_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:tracking)= 4 | # Multi-target tracking 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/unscented/unscented_filter.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Unscented filtering" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } 33 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/unscented/unscented_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:unscented)= 4 | # Unscented methods 5 | 6 | ```{tableofcontents} 7 | ``` -------------------------------------------------------------------------------- /_build/html/_sources/chapters/unscented/unscented_smoother.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Unscented smoothing" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } 33 | -------------------------------------------------------------------------------- /_build/html/_sources/chapters/vi/vi_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:VI)= 4 | # Variational inference 5 | 6 | {cite}`BayesNewton`, 7 | {cite}`Courts2020`, {cite}`Courts2021` 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /_build/html/_sources/intro.md: -------------------------------------------------------------------------------- 1 | # State Space Models: A Modern Approach 2 | 3 | This is an interactive textbook on state space models (SSM) 4 | using the [JAX Python library](https://github.com/google/jax). 5 | Some of the content is based on the 2013 book 6 | [Bayesian Filtering and Smoothing](https://users.aalto.fi/~ssarkka/pub/cup_book_online_20131111.pdf) 7 | by Simo Sarkka. 8 | However, we also cover more "modern" material, exploiting recent progress 9 | in automatic differentiation and parallel computing. 10 | 11 | Last update: 2022-03-22 12 | 13 | 14 | ```{tableofcontents} 15 | ``` 16 | -------------------------------------------------------------------------------- /_build/html/_sources/kevin.md: -------------------------------------------------------------------------------- 1 | --- 2 | jupytext: 3 | cell_metadata_filter: -all 4 | formats: md:myst 5 | text_representation: 6 | extension: .md 7 | format_name: myst 8 | format_version: 0.13 9 | jupytext_version: 1.11.5 10 | kernelspec: 11 | display_name: Python 3 12 | language: python 13 | name: python3 14 | --- 15 | 16 | # Kevin's noodling 17 | 18 | In this chapter, we do blah. 19 | For more details, see [](sec:bar), where we discuss bar. 20 | 21 | 22 | ## Python 23 | 24 | ```{code-cell} 25 | from matplotlib import rcParams, cycler 26 | import matplotlib.pyplot as plt 27 | import numpy as np 28 | plt.ion() 29 | ``` 30 | 31 | ```{code-cell} 32 | # Fixing random state for reproducibility 33 | np.random.seed(19680801) 34 | 35 | N = 10 36 | data = [np.logspace(0, 1, 100) + np.random.randn(100) + ii for ii in range(N)] 37 | data = np.array(data).T 38 | cmap = plt.cm.coolwarm 39 | rcParams['axes.prop_cycle'] = cycler(color=cmap(np.linspace(0, 1, N))) 40 | 41 | 42 | from matplotlib.lines import Line2D 43 | custom_lines = [Line2D([0], [0], color=cmap(0.), lw=4), 44 | Line2D([0], [0], color=cmap(.5), lw=4), 45 | Line2D([0], [0], color=cmap(1.), lw=4)] 46 | 47 | fig, ax = plt.subplots(figsize=(10, 5)) 48 | lines = ax.plot(data) 49 | ax.legend(custom_lines, ['Cold', 'Medium', 'Hot']); 50 | ``` 51 | 52 | ## Images 53 | 54 | [](https://myst-parser.readthedocs.io/en/latest/_static/logo-wide.svg) 55 | 56 | ![](https://myst-parser.readthedocs.io/en/latest/_static/logo-wide.svg) 57 | 58 | 60 | 61 | 62 | ## Math 63 | 64 | $$ 65 | a x^2 + bx+ c = 0 66 | $$ 67 | 68 | $$ 69 | \begin{align} 70 | 0 &= a x^2 + bx+ c \\ 71 | 0 &= a x^2 + bx+ c 72 | \end{align} 73 | $$ 74 | 75 | ## Refs 76 | 77 | For more details, see {cite}`holdgraf_evidence_2014` and foo. 78 | 79 | -------------------------------------------------------------------------------- /_build/html/_sources/markdown-notebooks.md: -------------------------------------------------------------------------------- 1 | --- 2 | jupytext: 3 | cell_metadata_filter: -all 4 | formats: md:myst 5 | text_representation: 6 | extension: .md 7 | format_name: myst 8 | format_version: 0.13 9 | jupytext_version: 1.11.5 10 | kernelspec: 11 | display_name: Python 3 12 | language: python 13 | name: python3 14 | --- 15 | 16 | # Notebooks with MyST Markdown 17 | 18 | Jupyter Book also lets you write text-based notebooks using MyST Markdown. 19 | See [the Notebooks with MyST Markdown documentation](https://jupyterbook.org/file-types/myst-notebooks.html) for more detailed instructions. 20 | This page shows off a notebook written in MyST Markdown. 21 | 22 | ## An example cell 23 | 24 | With MyST Markdown, you can define code cells with a directive like so: 25 | 26 | ```{code-cell} 27 | print(2 + 2) 28 | ``` 29 | 30 | When your book is built, the contents of any `{code-cell}` blocks will be 31 | executed with your default Jupyter kernel, and their outputs will be displayed 32 | in-line with the rest of your content. 33 | 34 | ```{seealso} 35 | Jupyter Book uses [Jupytext](https://jupytext.readthedocs.io/en/latest/) to convert text-based files to notebooks, and can support [many other text-based notebook files](https://jupyterbook.org/file-types/jupytext.html). 36 | ``` 37 | 38 | ## Create a notebook with MyST Markdown 39 | 40 | MyST Markdown notebooks are defined by two things: 41 | 42 | 1. YAML metadata that is needed to understand if / how it should convert text files to notebooks (including information about the kernel needed). 43 | See the YAML at the top of this page for example. 44 | 2. The presence of `{code-cell}` directives, which will be executed with your book. 45 | 46 | That's all that is needed to get started! 47 | 48 | ## Quickly add YAML metadata for MyST Notebooks 49 | 50 | If you have a markdown file and you'd like to quickly add YAML metadata to it, so that Jupyter Book will treat it as a MyST Markdown Notebook, run the following command: 51 | 52 | ``` 53 | jupyter-book myst init path/to/markdownfile.md 54 | ``` 55 | -------------------------------------------------------------------------------- /_build/html/_sources/markdown.md: -------------------------------------------------------------------------------- 1 | # Markdown Files 2 | 3 | Whether you write your book's content in Jupyter Notebooks (`.ipynb`) or 4 | in regular markdown files (`.md`), you'll write in the same flavor of markdown 5 | called **MyST Markdown**. 6 | This is a simple file to help you get started and show off some syntax. 7 | 8 | ## What is MyST? 9 | 10 | MyST stands for "Markedly Structured Text". It 11 | is a slight variation on a flavor of markdown called "CommonMark" markdown, 12 | with small syntax extensions to allow you to write **roles** and **directives** 13 | in the Sphinx ecosystem. 14 | 15 | For more about MyST, see [the MyST Markdown Overview](https://jupyterbook.org/content/myst.html). 16 | 17 | ## Sample Roles and Directivs 18 | 19 | Roles and directives are two of the most powerful tools in Jupyter Book. They 20 | are kind of like functions, but written in a markup language. They both 21 | serve a similar purpose, but **roles are written in one line**, whereas 22 | **directives span many lines**. They both accept different kinds of inputs, 23 | and what they do with those inputs depends on the specific role or directive 24 | that is being called. 25 | 26 | Here is a "note" directive: 27 | 28 | ```{note} 29 | Here is a note 30 | ``` 31 | 32 | It will be rendered in a special box when you build your book. 33 | 34 | Here is an inline directive to refer to a document: {doc}`markdown-notebooks`. 35 | 36 | 37 | ## Citations 38 | 39 | You can also cite references that are stored in a `bibtex` file. For example, 40 | the following syntax: `` {cite}`holdgraf_evidence_2014` `` will render like 41 | this: {cite}`holdgraf_evidence_2014`. 42 | 43 | Moreover, you can insert a bibliography into your page with this syntax: 44 | The `{bibliography}` directive must be used for all the `{cite}` roles to 45 | render properly. 46 | For example, if the references for your book are stored in `references.bib`, 47 | then the bibliography is inserted with: 48 | 49 | ```{bibliography} 50 | ``` 51 | 52 | ## Learn more 53 | 54 | This is just a simple starter to get you started. 55 | You can learn a lot more at [jupyterbook.org](https://jupyterbook.org). 56 | -------------------------------------------------------------------------------- /_build/html/_sources/mymarkdownfile.md: -------------------------------------------------------------------------------- 1 | # A new chapter begins. 2 | 3 | This is some sample text. 4 | 5 | (sec:bar)= 6 | ## Section BAR 7 | 8 | Here is a [reference to the intro](intro.md). 9 | Hooray. 10 | -------------------------------------------------------------------------------- /_build/html/_sources/root.md: -------------------------------------------------------------------------------- 1 | # State Space Models: A Modern Approach 2 | 3 | This is an interactive textbook on state space models (SSM) 4 | using the [JAX Python library](https://github.com/google/jax). 5 | Some of the content is covered in other books 6 | such as {cite}`Sarkka13` and {cite}`vol2`. 7 | However, we go into more detail, and focus on how to efficiently 8 | implement the various algorithms in a "modern" computing environment, 9 | exploiting recent progress 10 | in automatic differentiation and parallel computing. 11 | 12 | 13 | ```{tableofcontents} 14 | ``` 15 | -------------------------------------------------------------------------------- /_build/html/_static/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_static/__init__.py -------------------------------------------------------------------------------- /_build/html/_static/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_static/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /_build/html/_static/check-solid.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /_build/html/_static/copy-button.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /_build/html/_static/copybutton.css: -------------------------------------------------------------------------------- 1 | /* Copy buttons */ 2 | button.copybtn { 3 | position: absolute; 4 | display: flex; 5 | top: .3em; 6 | right: .3em; 7 | width: 1.7em; 8 | height: 1.7em; 9 | opacity: 0; 10 | transition: opacity 0.3s, border .3s, background-color .3s; 11 | user-select: none; 12 | padding: 0; 13 | border: none; 14 | outline: none; 15 | border-radius: 0.4em; 16 | /* The colors that GitHub uses */ 17 | border: #1b1f2426 1px solid; 18 | background-color: #f6f8fa; 19 | color: #57606a; 20 | } 21 | 22 | button.copybtn.success { 23 | border-color: #22863a; 24 | color: #22863a; 25 | } 26 | 27 | button.copybtn svg { 28 | stroke: currentColor; 29 | width: 1.5em; 30 | height: 1.5em; 31 | padding: 0.1em; 32 | } 33 | 34 | div.highlight { 35 | position: relative; 36 | } 37 | 38 | .highlight:hover button.copybtn { 39 | opacity: 1; 40 | } 41 | 42 | .highlight button.copybtn:hover { 43 | background-color: rgb(235, 235, 235); 44 | } 45 | 46 | .highlight button.copybtn:active { 47 | background-color: rgb(187, 187, 187); 48 | } 49 | 50 | /** 51 | * A minimal CSS-only tooltip copied from: 52 | * https://codepen.io/mildrenben/pen/rVBrpK 53 | * 54 | * To use, write HTML like the following: 55 | * 56 | *

Short

57 | */ 58 | .o-tooltip--left { 59 | position: relative; 60 | } 61 | 62 | .o-tooltip--left:after { 63 | opacity: 0; 64 | visibility: hidden; 65 | position: absolute; 66 | content: attr(data-tooltip); 67 | padding: .2em; 68 | font-size: .8em; 69 | left: -.2em; 70 | background: grey; 71 | color: white; 72 | white-space: nowrap; 73 | z-index: 2; 74 | border-radius: 2px; 75 | transform: translateX(-102%) translateY(0); 76 | transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1); 77 | } 78 | 79 | .o-tooltip--left:hover:after { 80 | display: block; 81 | opacity: 1; 82 | visibility: visible; 83 | transform: translateX(-100%) translateY(0); 84 | transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1); 85 | transition-delay: .5s; 86 | } 87 | 88 | /* By default the copy button shouldn't show up when printing a page */ 89 | @media print { 90 | button.copybtn { 91 | display: none; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /_build/html/_static/copybutton_funcs.js: -------------------------------------------------------------------------------- 1 | function escapeRegExp(string) { 2 | return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string 3 | } 4 | 5 | // Callback when a copy button is clicked. Will be passed the node that was clicked 6 | // should then grab the text and replace pieces of text that shouldn't be used in output 7 | export function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") { 8 | 9 | var regexp; 10 | var match; 11 | 12 | // Do we check for line continuation characters and "HERE-documents"? 13 | var useLineCont = !!lineContinuationChar 14 | var useHereDoc = !!hereDocDelim 15 | 16 | // create regexp to capture prompt and remaining line 17 | if (isRegexp) { 18 | regexp = new RegExp('^(' + copybuttonPromptText + ')(.*)') 19 | } else { 20 | regexp = new RegExp('^(' + escapeRegExp(copybuttonPromptText) + ')(.*)') 21 | } 22 | 23 | const outputLines = []; 24 | var promptFound = false; 25 | var gotLineCont = false; 26 | var gotHereDoc = false; 27 | const lineGotPrompt = []; 28 | for (const line of textContent.split('\n')) { 29 | match = line.match(regexp) 30 | if (match || gotLineCont || gotHereDoc) { 31 | promptFound = regexp.test(line) 32 | lineGotPrompt.push(promptFound) 33 | if (removePrompts && promptFound) { 34 | outputLines.push(match[2]) 35 | } else { 36 | outputLines.push(line) 37 | } 38 | gotLineCont = line.endsWith(lineContinuationChar) & useLineCont 39 | if (line.includes(hereDocDelim) & useHereDoc) 40 | gotHereDoc = !gotHereDoc 41 | } else if (!onlyCopyPromptLines) { 42 | outputLines.push(line) 43 | } else if (copyEmptyLines && line.trim() === '') { 44 | outputLines.push(line) 45 | } 46 | } 47 | 48 | // If no lines with the prompt were found then just use original lines 49 | if (lineGotPrompt.some(v => v === true)) { 50 | textContent = outputLines.join('\n'); 51 | } 52 | 53 | // Remove a trailing newline to avoid auto-running when pasting 54 | if (textContent.endsWith("\n")) { 55 | textContent = textContent.slice(0, -1) 56 | } 57 | return textContent 58 | } 59 | -------------------------------------------------------------------------------- /_build/html/_static/css/blank.css: -------------------------------------------------------------------------------- 1 | /* This file is intentionally left blank to override the stylesheet of the 2 | parent theme via theme.conf. The parent style we import directly in theme.css */ -------------------------------------------------------------------------------- /_build/html/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | var DOCUMENTATION_OPTIONS = { 2 | URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), 3 | VERSION: '', 4 | LANGUAGE: 'None', 5 | COLLAPSE_INDEX: false, 6 | BUILDER: 'html', 7 | FILE_SUFFIX: '.html', 8 | LINK_SUFFIX: '.html', 9 | HAS_SOURCE: true, 10 | SOURCELINK_SUFFIX: '', 11 | NAVIGATION_WITH_KEYS: true, 12 | SHOW_SEARCH_SUMMARY: true, 13 | ENABLE_SEARCH_SHORTCUTS: true, 14 | }; -------------------------------------------------------------------------------- /_build/html/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_static/file.png -------------------------------------------------------------------------------- /_build/html/_static/images/logo_binder.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 10 | logo 11 | 12 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /_build/html/_static/images/logo_colab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_static/images/logo_colab.png -------------------------------------------------------------------------------- /_build/html/_static/images/logo_jupyterhub.svg: -------------------------------------------------------------------------------- 1 | logo_jupyterhubHub 2 | -------------------------------------------------------------------------------- /_build/html/_static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_static/logo.png -------------------------------------------------------------------------------- /_build/html/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_static/minus.png -------------------------------------------------------------------------------- /_build/html/_static/panels-main.c949a650a448cc0ae9fd3441c0e17fb0.css: -------------------------------------------------------------------------------- 1 | details.dropdown .summary-title{padding-right:3em !important;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none}details.dropdown:hover{cursor:pointer}details.dropdown .summary-content{cursor:default}details.dropdown summary{list-style:none;padding:1em}details.dropdown summary .octicon.no-title{vertical-align:middle}details.dropdown[open] summary .octicon.no-title{visibility:hidden}details.dropdown summary::-webkit-details-marker{display:none}details.dropdown summary:focus{outline:none}details.dropdown summary:hover .summary-up svg,details.dropdown summary:hover .summary-down svg{opacity:1}details.dropdown .summary-up svg,details.dropdown .summary-down svg{display:block;opacity:.6}details.dropdown .summary-up,details.dropdown .summary-down{pointer-events:none;position:absolute;right:1em;top:.75em}details.dropdown[open] .summary-down{visibility:hidden}details.dropdown:not([open]) .summary-up{visibility:hidden}details.dropdown.fade-in[open] summary~*{-moz-animation:panels-fade-in .5s ease-in-out;-webkit-animation:panels-fade-in .5s ease-in-out;animation:panels-fade-in .5s ease-in-out}details.dropdown.fade-in-slide-down[open] summary~*{-moz-animation:panels-fade-in .5s ease-in-out, panels-slide-down .5s ease-in-out;-webkit-animation:panels-fade-in .5s ease-in-out, panels-slide-down .5s ease-in-out;animation:panels-fade-in .5s ease-in-out, panels-slide-down .5s ease-in-out}@keyframes panels-fade-in{0%{opacity:0}100%{opacity:1}}@keyframes panels-slide-down{0%{transform:translate(0, -10px)}100%{transform:translate(0, 0)}}.octicon{display:inline-block;fill:currentColor;vertical-align:text-top}.tabbed-content{box-shadow:0 -.0625rem var(--tabs-color-overline),0 .0625rem var(--tabs-color-underline);display:none;order:99;padding-bottom:.75rem;padding-top:.75rem;width:100%}.tabbed-content>:first-child{margin-top:0 !important}.tabbed-content>:last-child{margin-bottom:0 !important}.tabbed-content>.tabbed-set{margin:0}.tabbed-set{border-radius:.125rem;display:flex;flex-wrap:wrap;margin:1em 0;position:relative}.tabbed-set>input{opacity:0;position:absolute}.tabbed-set>input:checked+label{border-color:var(--tabs-color-label-active);color:var(--tabs-color-label-active)}.tabbed-set>input:checked+label+.tabbed-content{display:block}.tabbed-set>input:focus+label{outline-style:auto}.tabbed-set>input:not(.focus-visible)+label{outline:none;-webkit-tap-highlight-color:transparent}.tabbed-set>label{border-bottom:.125rem solid transparent;color:var(--tabs-color-label-inactive);cursor:pointer;font-size:var(--tabs-size-label);font-weight:700;padding:1em 1.25em .5em;transition:color 250ms;width:auto;z-index:1}html .tabbed-set>label:hover{color:var(--tabs-color-label-active)} 2 | -------------------------------------------------------------------------------- /_build/html/_static/panels-variables.06eb56fa6e07937060861dad626602ad.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --tabs-color-label-active: hsla(231, 99%, 66%, 1); 3 | --tabs-color-label-inactive: rgba(178, 206, 245, 0.62); 4 | --tabs-color-overline: rgb(207, 236, 238); 5 | --tabs-color-underline: rgb(207, 236, 238); 6 | --tabs-size-label: 1rem; 7 | } -------------------------------------------------------------------------------- /_build/html/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_static/plus.png -------------------------------------------------------------------------------- /_build/html/_static/sphinx-book-theme.d59cb220de22ca1c485ebbdc042f0030.js: -------------------------------------------------------------------------------- 1 | var initTriggerNavBar=()=>{if($(window).width()<768){$("#navbar-toggler").trigger("click")}} 2 | var scrollToActive=()=>{var navbar=document.getElementById('site-navigation') 3 | var active_pages=navbar.querySelectorAll(".active") 4 | var active_page=active_pages[active_pages.length-1] 5 | if(active_page!==undefined&&active_page.offsetTop>($(window).height()*.5)){navbar.scrollTop=active_page.offsetTop-($(window).height()*.2)}} 6 | var sbRunWhenDOMLoaded=cb=>{if(document.readyState!='loading'){cb()}else if(document.addEventListener){document.addEventListener('DOMContentLoaded',cb)}else{document.attachEvent('onreadystatechange',function(){if(document.readyState=='complete')cb()})}} 7 | function toggleFullScreen(){var navToggler=$("#navbar-toggler");if(!document.fullscreenElement){document.documentElement.requestFullscreen();if(!navToggler.hasClass("collapsed")){navToggler.click();}}else{if(document.exitFullscreen){document.exitFullscreen();if(navToggler.hasClass("collapsed")){navToggler.click();}}}} 8 | var initTooltips=()=>{$(document).ready(function(){$('[data-toggle="tooltip"]').tooltip();});} 9 | var initTocHide=()=>{var scrollTimeout;var throttle=200;var tocHeight=$("#bd-toc-nav").outerHeight(true)+$(".bd-toc").outerHeight(true);var hideTocAfter=tocHeight+200;var checkTocScroll=function(){var margin_content=$(".margin, .tag_margin, .full-width, .full_width, .tag_full-width, .tag_full_width, .sidebar, .tag_sidebar, .popout, .tag_popout");margin_content.each((index,item)=>{var topOffset=$(item).offset().top-$(window).scrollTop();var bottomOffset=topOffset+$(item).outerHeight(true);var removeToc=(topOffset=0);if(removeToc&&window.pageYOffset>20){$("div.bd-toc").removeClass("show") 10 | return false}else{$("div.bd-toc").addClass("show")};})};var manageScrolledClassOnBody=function(){if(window.scrollY>0){document.body.classList.add("scrolled");}else{document.body.classList.remove("scrolled");}} 11 | $(window).on('scroll',function(){if(!scrollTimeout){scrollTimeout=setTimeout(function(){checkTocScroll();manageScrolledClassOnBody();scrollTimeout=null;},throttle);}});} 12 | var printPdf=(el)=>{let tooltipID=$(el).attr("aria-describedby") 13 | let tooltipTextDiv=$("#"+tooltipID).detach() 14 | window.print() 15 | $("body").append(tooltipTextDiv)} 16 | var initThebeSBT=()=>{var title=$("div.section h1")[0] 17 | if(!$(title).next().hasClass("thebe-launch-button")){$("").insertAfter($(title))} 18 | initThebe();} 19 | sbRunWhenDOMLoaded(initTooltips) 20 | sbRunWhenDOMLoaded(initTriggerNavBar) 21 | sbRunWhenDOMLoaded(scrollToActive) 22 | sbRunWhenDOMLoaded(initTocHide) 23 | -------------------------------------------------------------------------------- /_build/html/_static/vendor/fontawesome/5.13.0/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Font Awesome Free License 2 | ------------------------- 3 | 4 | Font Awesome Free is free, open source, and GPL friendly. You can use it for 5 | commercial projects, open source projects, or really almost whatever you want. 6 | Full Font Awesome Free license: https://fontawesome.com/license/free. 7 | 8 | # Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/) 9 | In the Font Awesome Free download, the CC BY 4.0 license applies to all icons 10 | packaged as SVG and JS file types. 11 | 12 | # Fonts: SIL OFL 1.1 License (https://scripts.sil.org/OFL) 13 | In the Font Awesome Free download, the SIL OFL license applies to all icons 14 | packaged as web and desktop font files. 15 | 16 | # Code: MIT License (https://opensource.org/licenses/MIT) 17 | In the Font Awesome Free download, the MIT license applies to all non-font and 18 | non-icon files. 19 | 20 | # Attribution 21 | Attribution is required by MIT, SIL OFL, and CC BY licenses. Downloaded Font 22 | Awesome Free files already contain embedded comments with sufficient 23 | attribution, so you shouldn't need to do anything additional when using these 24 | files normally. 25 | 26 | We've kept attribution comments terse, so we ask that you do not actively work 27 | to remove them from files, especially code. They're a great way for folks to 28 | learn about Font Awesome. 29 | 30 | # Brand Icons 31 | All brand icons are trademarks of their respective owners. The use of these 32 | trademarks does not indicate endorsement of the trademark holder by Font 33 | Awesome, nor vice versa. **Please do not use brand logos for any purpose except 34 | to represent the company, product, or service to which they refer.** 35 | -------------------------------------------------------------------------------- /_build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.eot -------------------------------------------------------------------------------- /_build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /_build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff -------------------------------------------------------------------------------- /_build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /_build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.eot -------------------------------------------------------------------------------- /_build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /_build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.woff -------------------------------------------------------------------------------- /_build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /_build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.eot -------------------------------------------------------------------------------- /_build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /_build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff -------------------------------------------------------------------------------- /_build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /_build/html/_static/webpack-macros.html: -------------------------------------------------------------------------------- 1 | 2 | {% macro head_pre_icons() %} 3 | 5 | 7 | 9 | {% endmacro %} 10 | 11 | {% macro head_pre_fonts() %} 12 | {% endmacro %} 13 | 14 | {% macro head_pre_bootstrap() %} 15 | 16 | 17 | {% endmacro %} 18 | 19 | {% macro head_js_preload() %} 20 | 21 | {% endmacro %} 22 | 23 | {% macro body_post() %} 24 | 25 | {% endmacro %} -------------------------------------------------------------------------------- /_build/html/index.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /_build/html/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/html/objects.inv -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/blank.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Viterbi algorithm\n" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/blank.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Viterbi algorithm 5 | # 6 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/extended/extended_filter.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Extended Kalman filtering" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/extended/extended_filter.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Extended Kalman filtering 5 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/extended/extended_parallel.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Parallel extended Kalman smoothing\n", 8 | "\n", 9 | "{cite}`Sarkka2020icassp`\n" 10 | ] 11 | } 12 | ], 13 | "metadata": { 14 | "kernelspec": { 15 | "display_name": "Python 3", 16 | "language": "python", 17 | "name": "python3" 18 | }, 19 | "language_info": { 20 | "codemirror_mode": { 21 | "name": "ipython", 22 | "version": 3 23 | }, 24 | "file_extension": ".py", 25 | "mimetype": "text/x-python", 26 | "name": "python", 27 | "nbconvert_exporter": "python", 28 | "pygments_lexer": "ipython3", 29 | "version": "3.8.5" 30 | } 31 | }, 32 | "nbformat": 4, 33 | "nbformat_minor": 4 34 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/extended/extended_parallel.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Parallel extended Kalman smoothing 5 | # 6 | # {cite}`Sarkka2020icassp` 7 | # 8 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/extended/extended_smoother.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Extended Kalman smoother" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/extended/extended_smoother.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Extended Kalman smoother 5 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/hmm/hmm_examples.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Some example HMMs\n" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 1, 13 | "metadata": {}, 14 | "outputs": [], 15 | "source": [ 16 | "{\n", 17 | " \"tags\": [\n", 18 | " \"hide-input\",\n", 19 | " ]\n", 20 | "}\n", 21 | "\n", 22 | "# Install necessary libraries\n", 23 | "\n", 24 | "try:\n", 25 | " import jax\n", 26 | "except:\n", 27 | " # For cuda version, see https://github.com/google/jax#installation\n", 28 | " %pip install --upgrade \"jax[cpu]\" \n", 29 | " import jax\n", 30 | "\n", 31 | "try:\n", 32 | " import jsl\n", 33 | "except:\n", 34 | " %pip install git+https://github.com/probml/jsl\n", 35 | " import jsl\n", 36 | "\n", 37 | "try:\n", 38 | " import rich\n", 39 | "except:\n", 40 | " %pip install rich\n", 41 | " import rich" 42 | ] 43 | }, 44 | { 45 | "cell_type": "code", 46 | "execution_count": 2, 47 | "metadata": {}, 48 | "outputs": [], 49 | "source": [ 50 | "import abc\n", 51 | "from dataclasses import dataclass\n", 52 | "import functools\n", 53 | "import itertools\n", 54 | "\n", 55 | "from typing import Any, Callable, NamedTuple, Optional, Union, Tuple\n", 56 | "\n", 57 | "\n", 58 | "import jax\n", 59 | "import jax.numpy as jnp\n", 60 | "import matplotlib.pyplot as plt\n", 61 | "import numpy as np\n", 62 | "\n", 63 | "import inspect\n", 64 | "import inspect as py_inspect\n", 65 | "\n", 66 | "from rich import inspect as r_inspect\n", 67 | "from rich import print as r_print\n", 68 | "\n", 69 | "def print_source(fname):\n", 70 | " r_print(py_inspect.getsource(fname))" 71 | ] 72 | } 73 | ], 74 | "metadata": { 75 | "kernelspec": { 76 | "display_name": "Python 3", 77 | "language": "python", 78 | "name": "python3" 79 | }, 80 | "language_info": { 81 | "codemirror_mode": { 82 | "name": "ipython", 83 | "version": 3 84 | }, 85 | "file_extension": ".py", 86 | "mimetype": "text/x-python", 87 | "name": "python", 88 | "nbconvert_exporter": "python", 89 | "pygments_lexer": "ipython3", 90 | "version": "3.8.5" 91 | } 92 | }, 93 | "nbformat": 4, 94 | "nbformat_minor": 4 95 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/hmm/hmm_examples.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Some example HMMs 5 | # 6 | 7 | # In[1]: 8 | 9 | 10 | { 11 | "tags": [ 12 | "hide-input", 13 | ] 14 | } 15 | 16 | # Install necessary libraries 17 | 18 | try: 19 | import jax 20 | except: 21 | # For cuda version, see https://github.com/google/jax#installation 22 | get_ipython().run_line_magic('pip', 'install --upgrade "jax[cpu]"') 23 | import jax 24 | 25 | try: 26 | import jsl 27 | except: 28 | get_ipython().run_line_magic('pip', 'install git+https://github.com/probml/jsl') 29 | import jsl 30 | 31 | try: 32 | import rich 33 | except: 34 | get_ipython().run_line_magic('pip', 'install rich') 35 | import rich 36 | 37 | 38 | # In[2]: 39 | 40 | 41 | import abc 42 | from dataclasses import dataclass 43 | import functools 44 | import itertools 45 | 46 | from typing import Any, Callable, NamedTuple, Optional, Union, Tuple 47 | 48 | 49 | import jax 50 | import jax.numpy as jnp 51 | import matplotlib.pyplot as plt 52 | import numpy as np 53 | 54 | import inspect 55 | import inspect as py_inspect 56 | 57 | from rich import inspect as r_inspect 58 | from rich import print as r_print 59 | 60 | def print_source(fname): 61 | r_print(py_inspect.getsource(fname)) 62 | 63 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/hmm/hmm_filter.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# HMM filtering (forwards algorithm)\n" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/hmm/hmm_filter.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # HMM filtering (forwards algorithm) 5 | # 6 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/hmm/hmm_parallel.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Parallel HMM smoothing\n", 8 | "\n", 9 | "{cite}`Hassan2021`\n", 10 | "\n", 11 | "\n" 12 | ] 13 | } 14 | ], 15 | "metadata": { 16 | "kernelspec": { 17 | "display_name": "Python 3", 18 | "language": "python", 19 | "name": "python3" 20 | }, 21 | "language_info": { 22 | "codemirror_mode": { 23 | "name": "ipython", 24 | "version": 3 25 | }, 26 | "file_extension": ".py", 27 | "mimetype": "text/x-python", 28 | "name": "python", 29 | "nbconvert_exporter": "python", 30 | "pygments_lexer": "ipython3", 31 | "version": "3.8.5" 32 | } 33 | }, 34 | "nbformat": 4, 35 | "nbformat_minor": 4 36 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/hmm/hmm_parallel.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Parallel HMM smoothing 5 | # 6 | # {cite}`Hassan2021` 7 | # 8 | # 9 | # 10 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/hmm/hmm_sampling.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Forwards-filtering backwards-sampling algorithm\n" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/hmm/hmm_sampling.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Forwards-filtering backwards-sampling algorithm 5 | # 6 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/hmm/hmm_smoother.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# HMM smoothing (forwards-backwards algorithm)\n" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "## Forwards filter, backwards smoother algorithm" 15 | ] 16 | }, 17 | { 18 | "cell_type": "markdown", 19 | "metadata": {}, 20 | "source": [ 21 | "## Two-filter algorithm" 22 | ] 23 | }, 24 | { 25 | "cell_type": "markdown", 26 | "metadata": {}, 27 | "source": [] 28 | } 29 | ], 30 | "metadata": { 31 | "kernelspec": { 32 | "display_name": "Python 3", 33 | "language": "python", 34 | "name": "python3" 35 | }, 36 | "language_info": { 37 | "codemirror_mode": { 38 | "name": "ipython", 39 | "version": 3 40 | }, 41 | "file_extension": ".py", 42 | "mimetype": "text/x-python", 43 | "name": "python", 44 | "nbconvert_exporter": "python", 45 | "pygments_lexer": "ipython3", 46 | "version": "3.8.5" 47 | } 48 | }, 49 | "nbformat": 4, 50 | "nbformat_minor": 4 51 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/hmm/hmm_smoother.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # HMM smoothing (forwards-backwards algorithm) 5 | # 6 | 7 | # ## Forwards filter, backwards smoother algorithm 8 | 9 | # ## Two-filter algorithm 10 | 11 | # 12 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/hmm/hmm_viterbi.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Viterbi algorithm\n" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/hmm/hmm_viterbi.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Viterbi algorithm 5 | # 6 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/imports.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # In[1]: 5 | 6 | 7 | # Install necessary libraries 8 | 9 | 10 | get_ipython().run_line_magic('pip', 'install --upgrade pip') 11 | 12 | try: 13 | import jax 14 | except: 15 | # For cuda version, see https://github.com/google/jax#installation 16 | get_ipython().run_line_magic('pip', 'install --upgrade "jax[cpu]"') 17 | import jax 18 | 19 | try: 20 | import optax 21 | except: 22 | get_ipython().run_line_magic('pip', 'install --upgrade git+https://github.com/deepmind/optax.git') 23 | import optax 24 | 25 | try: 26 | import jaxopt 27 | except: 28 | get_ipython().run_line_magic('pip', 'install --upgrade git+https://github.com/google/jaxopt.git') 29 | import jaxopt 30 | 31 | 32 | try: 33 | import flax 34 | except: 35 | get_ipython().run_line_magic('pip', 'install --upgrade git+https://github.com/google/flax.git') 36 | import flax 37 | 38 | try: 39 | import distrax 40 | except: 41 | get_ipython().run_line_magic('pip', 'install --upgrade git+https://github.com/deepmind/distrax.git') 42 | import distrax 43 | 44 | try: 45 | import blackjax 46 | except: 47 | get_ipython().run_line_magic('pip', 'install --upgrade git+https://github.com/blackjax-devs/blackjax.git') 48 | import blackjax 49 | 50 | try: 51 | import jsl 52 | except: 53 | get_ipython().run_line_magic('pip', 'install git+https://github.com/probml/jsl') 54 | import jsl 55 | 56 | try: 57 | import rich 58 | except: 59 | get_ipython().run_line_magic('pip', 'install rich') 60 | import rich 61 | 62 | 63 | 64 | # In[2]: 65 | 66 | 67 | import abc 68 | from dataclasses import dataclass 69 | import functools 70 | import itertools 71 | 72 | from typing import Any, Callable, NamedTuple, Optional, Union, Tuple 73 | 74 | 75 | import jax 76 | import jax.numpy as jnp 77 | import matplotlib.pyplot as plt 78 | import numpy as np 79 | 80 | import inspect 81 | import inspect as py_inspect 82 | 83 | from rich import inspect as r_inspect 84 | from rich import print as r_print 85 | 86 | def print_source(fname): 87 | r_print(py_inspect.getsource(fname)) 88 | 89 | 90 | # In[3]: 91 | 92 | 93 | 94 | 95 | def print_source_old(fname): 96 | print('source code of ', fname) 97 | #txt = inspect.getsource(fname) 98 | (lines, line_num) = inspect.getsourcelines(fname) 99 | for line in lines: 100 | print(line.strip('\n')) 101 | 102 | 103 | # In[4]: 104 | 105 | 106 | import jsl 107 | import jsl.hmm.hmm_numpy_lib as hmm_lib_np 108 | #import jsl.hmm.hmm_lib as hmm_lib_jax 109 | 110 | normalize = hmm_lib_np.normalize_numpy 111 | print_source(normalize) 112 | #print_source(hmm_lib_np.normalize_numpy) 113 | 114 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/intro-chap.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # (ch:intro)= 5 | # # Introduction 6 | # 7 | # 8 | # 9 | # 10 | # In this chapter, we do blah. 11 | # Specifically 12 | # 13 | # - foo 14 | # - bar. 15 | # - baz 16 | # 17 | # For more details, see [](ch:hmm) 18 | # and [HMM chapter](ch:hmm) 19 | # and {ref}`ch:hmm` 20 | # and {cite}`Sarkka13`. 21 | # 22 | # 23 | # ## What are state space models? 24 | # 25 | # ## Python 26 | # 27 | # We\'re now ready to start coding. 28 | 29 | # In[1]: 30 | 31 | 32 | from matplotlib import rcParams, cycler 33 | import matplotlib.pyplot as plt 34 | import numpy as np 35 | plt.ion() 36 | 37 | 38 | # In[2]: 39 | 40 | 41 | # Fixing random state for reproducibility 42 | np.random.seed(19680801) 43 | 44 | N = 10 45 | data = [np.logspace(0, 1, 100) + np.random.randn(100) + ii for ii in range(N)] 46 | data = np.array(data).T 47 | cmap = plt.cm.coolwarm 48 | rcParams['axes.prop_cycle'] = cycler(color=cmap(np.linspace(0, 1, N))) 49 | 50 | 51 | from matplotlib.lines import Line2D 52 | custom_lines = [Line2D([0], [0], color=cmap(0.), lw=4), 53 | Line2D([0], [0], color=cmap(.5), lw=4), 54 | Line2D([0], [0], color=cmap(1.), lw=4)] 55 | 56 | fig, ax = plt.subplots(figsize=(10, 5)) 57 | lines = ax.plot(data) 58 | ax.legend(custom_lines, ['Cold', 'Medium', 'Hot']); 59 | 60 | 61 | # In[3]: 62 | 63 | 64 | import matplotlib.pyplot as plt 65 | import numpy as np 66 | import jax 67 | import jax.numpy as jnp 68 | 69 | print(jax.devices()) 70 | 71 | 72 | # ## Images 73 | # 74 | # 75 | # ![](https://myst-parser.readthedocs.io/en/latest/_static/logo-wide.svg) 76 | # 77 | # 79 | # 80 | # ```{figure} /images/cat_dog.jpg 81 | # :scale: 50% 82 | # :name: cat_dog 83 | # 84 | # A photo of a cat and a dog. 85 | # ``` 86 | # 87 | # ```{figure} /images/cat_dog.jpg 88 | # :scale: 50% 89 | # :name: cat_dog2 90 | # 91 | # Another photo of a cat and a dog. 92 | # ``` 93 | # 94 | # In {numref}`Figure %s ` we show catdog. 95 | # In {numref}`Figure %s ` we show catdog2, its twin. 96 | # 97 | # 98 | # ## Math 99 | # 100 | # We have $E= mc^2$, and also 101 | # 102 | # ```{math} 103 | # :label: foo 104 | # a x^2 + bx+ c = 0 105 | # ``` 106 | # 107 | # From {eq}`foo`, it follows that 108 | # $$ 109 | # \begin{align} 110 | # 0 &= a x^2 + bx+ c \\ 111 | # 0 &= a x^2 + bx+ c 112 | # \end{align} 113 | # $$ 114 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/intro-chap_2_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/jupyter_execute/chapters/intro-chap_2_0.png -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/intro.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # (ch:intro)= 5 | # # Scratchpad 6 | # 7 | # 8 | # In this chapter, we do blah. 9 | # Specifically 10 | # 11 | # - foo 12 | # - bar. 13 | # - baz 14 | # 15 | # For more details, see 16 | # {ref}`ch:hmm` and {cite}`Sarkka13`. 17 | # 18 | # 19 | # ## Python 20 | # 21 | # We\'re now ready to start coding. 22 | 23 | # In[1]: 24 | 25 | 26 | from matplotlib import rcParams, cycler 27 | import matplotlib.pyplot as plt 28 | import numpy as np 29 | plt.ion() 30 | 31 | 32 | # In[2]: 33 | 34 | 35 | # Fixing random state for reproducibility 36 | np.random.seed(19680801) 37 | 38 | N = 10 39 | data = [np.logspace(0, 1, 100) + np.random.randn(100) + ii for ii in range(N)] 40 | data = np.array(data).T 41 | cmap = plt.cm.coolwarm 42 | rcParams['axes.prop_cycle'] = cycler(color=cmap(np.linspace(0, 1, N))) 43 | 44 | 45 | from matplotlib.lines import Line2D 46 | custom_lines = [Line2D([0], [0], color=cmap(0.), lw=4), 47 | Line2D([0], [0], color=cmap(.5), lw=4), 48 | Line2D([0], [0], color=cmap(1.), lw=4)] 49 | 50 | fig, ax = plt.subplots(figsize=(10, 5)) 51 | lines = ax.plot(data) 52 | ax.legend(custom_lines, ['Cold', 'Medium', 'Hot']); 53 | 54 | 55 | # In[3]: 56 | 57 | 58 | import matplotlib.pyplot as plt 59 | import numpy as np 60 | import jax 61 | import jax.numpy as jnp 62 | 63 | print(jax.devices()) 64 | 65 | 66 | # ## Images 67 | # 68 | # 69 | # 76 | # 77 | # ```{figure} /figures/cat_dog.jpg 78 | # :scale: 50% 79 | # :name: cat_dog 80 | # 81 | # A photo of a cat and a dog. 82 | # ``` 83 | # 84 | # ```{figure} /figures/cat_dog.jpg 85 | # :scale: 50% 86 | # :name: cat_dog2 87 | # 88 | # Another photo of a cat and a dog. 89 | # ``` 90 | # 91 | # In {numref}`Figure %s ` we show catdog. 92 | # In {numref}`Figure %s ` we show catdog2, its twin. 93 | # 94 | # 95 | # ## Math 96 | # 97 | # We have $E= mc^2$, and also 98 | # 99 | # ```{math} 100 | # :label: foo 101 | # a x^2 + bx+ c = 0 102 | # ``` 103 | # 104 | # From {eq}`foo`, it follows that 105 | # 106 | # $$ 107 | # \begin{align} 108 | # 0 &= a x^2 + bx+ c \\ 109 | # 0 &= a x^2 + bx+ c 110 | # \end{align} 111 | # $$ 112 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/intro_2_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/jupyter_execute/chapters/intro_2_0.png -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/learning/em.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "(sec:em)=\n", 8 | "# Expectation Maximization (EM)\n", 9 | "\n", 10 | "{cite}`Ghahramani96a`\n" 11 | ] 12 | } 13 | ], 14 | "metadata": { 15 | "kernelspec": { 16 | "display_name": "Python 3", 17 | "language": "python", 18 | "name": "python3" 19 | }, 20 | "language_info": { 21 | "codemirror_mode": { 22 | "name": "ipython", 23 | "version": 3 24 | }, 25 | "file_extension": ".py", 26 | "mimetype": "text/x-python", 27 | "name": "python", 28 | "nbconvert_exporter": "python", 29 | "pygments_lexer": "ipython3", 30 | "version": "3.8.5" 31 | } 32 | }, 33 | "nbformat": 4, 34 | "nbformat_minor": 4 35 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/learning/em.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # (sec:em)= 5 | # # Expectation Maximization (EM) 6 | # 7 | # {cite}`Ghahramani96a` 8 | # 9 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/learning/mcmc.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "(sec:mcmc)=\n", 8 | "# Markov Chain Monte Carlo (MCMC)\n", 9 | "\n" 10 | ] 11 | } 12 | ], 13 | "metadata": { 14 | "kernelspec": { 15 | "display_name": "Python 3", 16 | "language": "python", 17 | "name": "python3" 18 | }, 19 | "language_info": { 20 | "codemirror_mode": { 21 | "name": "ipython", 22 | "version": 3 23 | }, 24 | "file_extension": ".py", 25 | "mimetype": "text/x-python", 26 | "name": "python", 27 | "nbconvert_exporter": "python", 28 | "pygments_lexer": "ipython3", 29 | "version": "3.8.5" 30 | } 31 | }, 32 | "nbformat": 4, 33 | "nbformat_minor": 4 34 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/learning/mcmc.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # (sec:mcmc)= 5 | # # Markov Chain Monte Carlo (MCMC) 6 | # 7 | # 8 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/learning/sgd.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "(sec:sgd)=\n", 8 | "# Stochastic Gradient Descent (SGD)\n", 9 | "\n" 10 | ] 11 | } 12 | ], 13 | "metadata": { 14 | "kernelspec": { 15 | "display_name": "Python 3", 16 | "language": "python", 17 | "name": "python3" 18 | }, 19 | "language_info": { 20 | "codemirror_mode": { 21 | "name": "ipython", 22 | "version": 3 23 | }, 24 | "file_extension": ".py", 25 | "mimetype": "text/x-python", 26 | "name": "python", 27 | "nbconvert_exporter": "python", 28 | "pygments_lexer": "ipython3", 29 | "version": "3.8.5" 30 | } 31 | }, 32 | "nbformat": 4, 33 | "nbformat_minor": 4 34 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/learning/sgd.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # (sec:sgd)= 5 | # # Stochastic Gradient Descent (SGD) 6 | # 7 | # 8 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/learning/vb.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "\n", 8 | "(sec:VB)=\n", 9 | "# Variational Bayes (VB)\n", 10 | "\n" 11 | ] 12 | } 13 | ], 14 | "metadata": { 15 | "kernelspec": { 16 | "display_name": "Python 3", 17 | "language": "python", 18 | "name": "python3" 19 | }, 20 | "language_info": { 21 | "codemirror_mode": { 22 | "name": "ipython", 23 | "version": 3 24 | }, 25 | "file_extension": ".py", 26 | "mimetype": "text/x-python", 27 | "name": "python", 28 | "nbconvert_exporter": "python", 29 | "pygments_lexer": "ipython3", 30 | "version": "3.8.5" 31 | } 32 | }, 33 | "nbformat": 4, 34 | "nbformat_minor": 4 35 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/learning/vb.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # 5 | # (sec:VB)= 6 | # # Variational Bayes (VB) 7 | # 8 | # 9 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/lgssm-chap.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Linear-Gaussian SSMs\n", 8 | "\n", 9 | "LG-SSM, aka LDS, are a workhorse..." 10 | ] 11 | } 12 | ], 13 | "metadata": { 14 | "jupytext": { 15 | "cell_metadata_filter": "-all", 16 | "formats": "md:myst", 17 | "text_representation": { 18 | "extension": ".md", 19 | "format_name": "myst", 20 | "format_version": 0.13, 21 | "jupytext_version": "1.11.5" 22 | } 23 | }, 24 | "kernelspec": { 25 | "display_name": "Python 3", 26 | "language": "python", 27 | "name": "python3" 28 | }, 29 | "language_info": { 30 | "codemirror_mode": { 31 | "name": "ipython", 32 | "version": 3 33 | }, 34 | "file_extension": ".py", 35 | "mimetype": "text/x-python", 36 | "name": "python", 37 | "nbconvert_exporter": "python", 38 | "pygments_lexer": "ipython3", 39 | "version": "3.8.5" 40 | }, 41 | "source_map": [ 42 | 14 43 | ] 44 | }, 45 | "nbformat": 4, 46 | "nbformat_minor": 4 47 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/lgssm-chap.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Linear-Gaussian SSMs 5 | # 6 | # LG-SSM, aka LDS, are a workhorse... 7 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/lgssm.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Linear-Gaussian SSMs\n", 8 | "\n", 9 | "## What are LG-SSMs?\n", 10 | "\n", 11 | "LG-SSM, aka LDS, are a workhorse...\n", 12 | "\n", 13 | "## Kalman filter\n", 14 | "\n", 15 | "## Kalman smoother" 16 | ] 17 | } 18 | ], 19 | "metadata": { 20 | "jupytext": { 21 | "cell_metadata_filter": "-all", 22 | "formats": "md:myst", 23 | "text_representation": { 24 | "extension": ".md", 25 | "format_name": "myst", 26 | "format_version": 0.13, 27 | "jupytext_version": "1.11.5" 28 | } 29 | }, 30 | "kernelspec": { 31 | "display_name": "Python 3", 32 | "language": "python", 33 | "name": "python3" 34 | }, 35 | "language_info": { 36 | "codemirror_mode": { 37 | "name": "ipython", 38 | "version": 3 39 | }, 40 | "file_extension": ".py", 41 | "mimetype": "text/x-python", 42 | "name": "python", 43 | "nbconvert_exporter": "python", 44 | "pygments_lexer": "ipython3", 45 | "version": "3.8.5" 46 | }, 47 | "source_map": [ 48 | 14 49 | ] 50 | }, 51 | "nbformat": 4, 52 | "nbformat_minor": 4 53 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/lgssm.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Linear-Gaussian SSMs 5 | # 6 | # ## What are LG-SSMs? 7 | # 8 | # LG-SSM, aka LDS, are a workhorse... 9 | # 10 | # ## Kalman filter 11 | # 12 | # ## Kalman smoother 13 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/lgssm/kalman_filter.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Kalman filtering" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/lgssm/kalman_filter.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Kalman filtering 5 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/lgssm/kalman_parallel.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Parallel Kalman Smoother\n", 8 | "\n", 9 | "{cite}`Sarkka2021`\n", 10 | "\n", 11 | "\n", 12 | "\n" 13 | ] 14 | } 15 | ], 16 | "metadata": { 17 | "kernelspec": { 18 | "display_name": "Python 3", 19 | "language": "python", 20 | "name": "python3" 21 | }, 22 | "language_info": { 23 | "codemirror_mode": { 24 | "name": "ipython", 25 | "version": 3 26 | }, 27 | "file_extension": ".py", 28 | "mimetype": "text/x-python", 29 | "name": "python", 30 | "nbconvert_exporter": "python", 31 | "pygments_lexer": "ipython3", 32 | "version": "3.8.5" 33 | } 34 | }, 35 | "nbformat": 4, 36 | "nbformat_minor": 4 37 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/lgssm/kalman_parallel.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Parallel Kalman Smoother 5 | # 6 | # {cite}`Sarkka2021` 7 | # 8 | # 9 | # 10 | # 11 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/lgssm/kalman_sampling.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Forwards-filtering backwards sampling" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/lgssm/kalman_sampling.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Forwards-filtering backwards sampling 5 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/lgssm/kalman_smoother.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Kalman (RTS) smoother" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/lgssm/kalman_smoother.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Kalman (RTS) smoother 5 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/scratch.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # (ch:intro)= 5 | # # Scratchpad 6 | # 7 | # 8 | # In this chapter, we do blah. 9 | # Specifically 10 | # 11 | # - foo 12 | # - bar. 13 | # - baz 14 | # 15 | # For more details, see 16 | # {ref}`ch:hmm` and {cite}`Sarkka13`. 17 | # 18 | # 19 | # ## Python 20 | # 21 | # We\'re now ready to start coding. 22 | 23 | # In[1]: 24 | 25 | 26 | from matplotlib import rcParams, cycler 27 | import matplotlib.pyplot as plt 28 | import numpy as np 29 | plt.ion() 30 | 31 | 32 | # In[2]: 33 | 34 | 35 | # Fixing random state for reproducibility 36 | np.random.seed(19680801) 37 | 38 | N = 10 39 | data = [np.logspace(0, 1, 100) + np.random.randn(100) + ii for ii in range(N)] 40 | data = np.array(data).T 41 | cmap = plt.cm.coolwarm 42 | rcParams['axes.prop_cycle'] = cycler(color=cmap(np.linspace(0, 1, N))) 43 | 44 | 45 | from matplotlib.lines import Line2D 46 | custom_lines = [Line2D([0], [0], color=cmap(0.), lw=4), 47 | Line2D([0], [0], color=cmap(.5), lw=4), 48 | Line2D([0], [0], color=cmap(1.), lw=4)] 49 | 50 | fig, ax = plt.subplots(figsize=(10, 5)) 51 | lines = ax.plot(data) 52 | ax.legend(custom_lines, ['Cold', 'Medium', 'Hot']); 53 | 54 | 55 | # In[3]: 56 | 57 | 58 | import matplotlib.pyplot as plt 59 | import numpy as np 60 | import jax 61 | import jax.numpy as jnp 62 | 63 | print(jax.devices()) 64 | 65 | 66 | # ## Images 67 | # 68 | # 69 | # 76 | # 77 | # ```{figure} /figures/cat_dog.jpg 78 | # :scale: 50% 79 | # :name: cat_dog 80 | # 81 | # A photo of a cat and a dog. 82 | # ``` 83 | # 84 | # ```{figure} /figures/cat_dog.jpg 85 | # :scale: 50% 86 | # :name: cat_dog2 87 | # 88 | # Another photo of a cat and a dog. 89 | # ``` 90 | # 91 | # In {numref}`Figure %s ` we show catdog. 92 | # In {numref}`Figure %s ` we show catdog2, its twin. 93 | # 94 | # 95 | # ## Math 96 | # 97 | # We have $E= mc^2$, and also 98 | # 99 | # ```{math} 100 | # :label: foo 101 | # a x^2 + bx+ c = 0 102 | # ``` 103 | # 104 | # From {eq}`foo`, it follows that 105 | # 106 | # $$ 107 | # \begin{align} 108 | # 0 &= a x^2 + bx+ c \\ 109 | # 0 &= a x^2 + bx+ c 110 | # \end{align} 111 | # $$ 112 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/scratch_2_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/jupyter_execute/chapters/scratch_2_0.png -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/ssm/deep.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Deep SSMs\n" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [] 14 | } 15 | ], 16 | "metadata": { 17 | "kernelspec": { 18 | "display_name": "Python 3", 19 | "language": "python", 20 | "name": "python3" 21 | }, 22 | "language_info": { 23 | "codemirror_mode": { 24 | "name": "ipython", 25 | "version": 3 26 | }, 27 | "file_extension": ".py", 28 | "mimetype": "text/x-python", 29 | "name": "python", 30 | "nbconvert_exporter": "python", 31 | "pygments_lexer": "ipython3", 32 | "version": "3.8.5" 33 | } 34 | }, 35 | "nbformat": 4, 36 | "nbformat_minor": 4 37 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/ssm/deep.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Deep SSMs 5 | # 6 | 7 | # 8 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/ssm/hsmm.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Hidden Semi-Markov Models\n", 8 | "\n" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.8.5" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 4 33 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/ssm/hsmm.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Hidden Semi-Markov Models 5 | # 6 | # 7 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/ssm/lgssm.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Linear Gaussian SSMs\n" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [] 14 | } 15 | ], 16 | "metadata": { 17 | "kernelspec": { 18 | "display_name": "Python 3", 19 | "language": "python", 20 | "name": "python3" 21 | }, 22 | "language_info": { 23 | "codemirror_mode": { 24 | "name": "ipython", 25 | "version": 3 26 | }, 27 | "file_extension": ".py", 28 | "mimetype": "text/x-python", 29 | "name": "python", 30 | "nbconvert_exporter": "python", 31 | "pygments_lexer": "ipython3", 32 | "version": "3.8.5" 33 | } 34 | }, 35 | "nbformat": 4, 36 | "nbformat_minor": 4 37 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/ssm/lgssm.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Linear Gaussian SSMs 5 | # 6 | 7 | # 8 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/ssm/nongauss.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Non-Gaussian SSMs\n" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [] 14 | } 15 | ], 16 | "metadata": { 17 | "kernelspec": { 18 | "display_name": "Python 3", 19 | "language": "python", 20 | "name": "python3" 21 | }, 22 | "language_info": { 23 | "codemirror_mode": { 24 | "name": "ipython", 25 | "version": 3 26 | }, 27 | "file_extension": ".py", 28 | "mimetype": "text/x-python", 29 | "name": "python", 30 | "nbconvert_exporter": "python", 31 | "pygments_lexer": "ipython3", 32 | "version": "3.8.5" 33 | } 34 | }, 35 | "nbformat": 4, 36 | "nbformat_minor": 4 37 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/ssm/nongauss.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Non-Gaussian SSMs 5 | # 6 | 7 | # 8 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/ssm/nonlin.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Non-Linear Gaussian SSMs\n" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/ssm/nonlin.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Non-Linear Gaussian SSMs 5 | # 6 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/ssm/rnn.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Recurrent Neural Networks\n" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [] 14 | } 15 | ], 16 | "metadata": { 17 | "kernelspec": { 18 | "display_name": "Python 3", 19 | "language": "python", 20 | "name": "python3" 21 | }, 22 | "language_info": { 23 | "codemirror_mode": { 24 | "name": "ipython", 25 | "version": 3 26 | }, 27 | "file_extension": ".py", 28 | "mimetype": "text/x-python", 29 | "name": "python", 30 | "nbconvert_exporter": "python", 31 | "pygments_lexer": "ipython3", 32 | "version": "3.8.5" 33 | } 34 | }, 35 | "nbformat": 4, 36 | "nbformat_minor": 4 37 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/ssm/rnn.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Recurrent Neural Networks 5 | # 6 | 7 | # 8 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/ssm/ssm_examples.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Boilerplate" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 1, 13 | "metadata": {}, 14 | "outputs": [], 15 | "source": [ 16 | "# Install necessary libraries\n", 17 | "\n", 18 | "try:\n", 19 | " import jax\n", 20 | "except:\n", 21 | " # For cuda version, see https://github.com/google/jax#installation\n", 22 | " %pip install --upgrade \"jax[cpu]\" \n", 23 | " import jax\n", 24 | "\n", 25 | "try:\n", 26 | " import jsl\n", 27 | "except:\n", 28 | " %pip install git+https://github.com/probml/jsl\n", 29 | " import jsl\n", 30 | "\n", 31 | "try:\n", 32 | " import rich\n", 33 | "except:\n", 34 | " %pip install rich\n", 35 | " import rich" 36 | ] 37 | }, 38 | { 39 | "cell_type": "code", 40 | "execution_count": 2, 41 | "metadata": {}, 42 | "outputs": [], 43 | "source": [ 44 | "# Import standrd libraries\n", 45 | "\n", 46 | "import abc\n", 47 | "from dataclasses import dataclass\n", 48 | "import functools\n", 49 | "import itertools\n", 50 | "\n", 51 | "from typing import Any, Callable, NamedTuple, Optional, Union, Tuple\n", 52 | "\n", 53 | "\n", 54 | "import jax\n", 55 | "import jax.numpy as jnp\n", 56 | "import matplotlib.pyplot as plt\n", 57 | "import numpy as np\n", 58 | "\n", 59 | "import inspect\n", 60 | "import inspect as py_inspect\n", 61 | "\n", 62 | "from rich import inspect as r_inspect\n", 63 | "from rich import print as r_print\n", 64 | "\n", 65 | "def print_source(fname):\n", 66 | " r_print(py_inspect.getsource(fname))" 67 | ] 68 | }, 69 | { 70 | "cell_type": "markdown", 71 | "metadata": {}, 72 | "source": [ 73 | "# Hidden Markov Models\n", 74 | "\n", 75 | "We first create the \"Ocassionally dishonest casino\" model from {cite}`Durbin98`.\n", 76 | "\n", 77 | "```{figure} /figures/casino.png\n", 78 | ":scale: 50%\n", 79 | ":name: casino\n", 80 | "\n", 81 | "Illustration of the casino HMM.\n", 82 | "```" 83 | ] 84 | } 85 | ], 86 | "metadata": { 87 | "kernelspec": { 88 | "display_name": "Python 3", 89 | "language": "python", 90 | "name": "python3" 91 | }, 92 | "language_info": { 93 | "codemirror_mode": { 94 | "name": "ipython", 95 | "version": 3 96 | }, 97 | "file_extension": ".py", 98 | "mimetype": "text/x-python", 99 | "name": "python", 100 | "nbconvert_exporter": "python", 101 | "pygments_lexer": "ipython3", 102 | "version": "3.8.5" 103 | } 104 | }, 105 | "nbformat": 4, 106 | "nbformat_minor": 4 107 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/ssm/ssm_examples.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Boilerplate 5 | 6 | # In[1]: 7 | 8 | 9 | # Install necessary libraries 10 | 11 | try: 12 | import jax 13 | except: 14 | # For cuda version, see https://github.com/google/jax#installation 15 | get_ipython().run_line_magic('pip', 'install --upgrade "jax[cpu]"') 16 | import jax 17 | 18 | try: 19 | import jsl 20 | except: 21 | get_ipython().run_line_magic('pip', 'install git+https://github.com/probml/jsl') 22 | import jsl 23 | 24 | try: 25 | import rich 26 | except: 27 | get_ipython().run_line_magic('pip', 'install rich') 28 | import rich 29 | 30 | 31 | # In[2]: 32 | 33 | 34 | # Import standrd libraries 35 | 36 | import abc 37 | from dataclasses import dataclass 38 | import functools 39 | import itertools 40 | 41 | from typing import Any, Callable, NamedTuple, Optional, Union, Tuple 42 | 43 | 44 | import jax 45 | import jax.numpy as jnp 46 | import matplotlib.pyplot as plt 47 | import numpy as np 48 | 49 | import inspect 50 | import inspect as py_inspect 51 | 52 | from rich import inspect as r_inspect 53 | from rich import print as r_print 54 | 55 | def print_source(fname): 56 | r_print(py_inspect.getsource(fname)) 57 | 58 | 59 | # # Hidden Markov Models 60 | # 61 | # We first create the "Ocassionally dishonest casino" model from {cite}`Durbin98`. 62 | # 63 | # ```{figure} /figures/casino.png 64 | # :scale: 50% 65 | # :name: casino 66 | # 67 | # Illustration of the casino HMM. 68 | # ``` 69 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/ssm/switching.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Switching SSMs\n" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "## Jump Markov Linear Dynamical Systems" 15 | ] 16 | }, 17 | { 18 | "cell_type": "markdown", 19 | "metadata": {}, 20 | "source": [] 21 | } 22 | ], 23 | "metadata": { 24 | "kernelspec": { 25 | "display_name": "Python 3", 26 | "language": "python", 27 | "name": "python3" 28 | }, 29 | "language_info": { 30 | "codemirror_mode": { 31 | "name": "ipython", 32 | "version": 3 33 | }, 34 | "file_extension": ".py", 35 | "mimetype": "text/x-python", 36 | "name": "python", 37 | "nbconvert_exporter": "python", 38 | "pygments_lexer": "ipython3", 39 | "version": "3.8.5" 40 | } 41 | }, 42 | "nbformat": 4, 43 | "nbformat_minor": 4 44 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/ssm/switching.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Switching SSMs 5 | # 6 | 7 | # ## Jump Markov Linear Dynamical Systems 8 | 9 | # 10 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/template.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "metadata": {}, 7 | "outputs": [], 8 | "source": [ 9 | "# Install necessary libraries\n", 10 | "\n", 11 | "try:\n", 12 | " import jax\n", 13 | "except:\n", 14 | " # For cuda version, see https://github.com/google/jax#installation\n", 15 | " %pip install --upgrade \"jax[cpu]\" \n", 16 | " import jax\n", 17 | "\n", 18 | "try:\n", 19 | " import jsl\n", 20 | "except:\n", 21 | " %pip install git+https://github.com/probml/jsl\n", 22 | " import jsl\n", 23 | "\n", 24 | "try:\n", 25 | " import rich\n", 26 | "except:\n", 27 | " %pip install rich\n", 28 | " import rich" 29 | ] 30 | }, 31 | { 32 | "cell_type": "code", 33 | "execution_count": 2, 34 | "metadata": {}, 35 | "outputs": [], 36 | "source": [ 37 | "# Import standrd libraries\n", 38 | "\n", 39 | "import abc\n", 40 | "from dataclasses import dataclass\n", 41 | "import functools\n", 42 | "import itertools\n", 43 | "\n", 44 | "from typing import Any, Callable, NamedTuple, Optional, Union, Tuple\n", 45 | "\n", 46 | "\n", 47 | "import jax\n", 48 | "import jax.numpy as jnp\n", 49 | "import matplotlib.pyplot as plt\n", 50 | "import numpy as np\n", 51 | "\n", 52 | "import inspect\n", 53 | "import inspect as py_inspect\n", 54 | "\n", 55 | "from rich import inspect as r_inspect\n", 56 | "from rich import print as r_print\n", 57 | "\n", 58 | "def print_source(fname):\n", 59 | " r_print(py_inspect.getsource(fname))" 60 | ] 61 | } 62 | ], 63 | "metadata": { 64 | "kernelspec": { 65 | "display_name": "Python 3", 66 | "language": "python", 67 | "name": "python3" 68 | }, 69 | "language_info": { 70 | "codemirror_mode": { 71 | "name": "ipython", 72 | "version": 3 73 | }, 74 | "file_extension": ".py", 75 | "mimetype": "text/x-python", 76 | "name": "python", 77 | "nbconvert_exporter": "python", 78 | "pygments_lexer": "ipython3", 79 | "version": "3.8.5" 80 | } 81 | }, 82 | "nbformat": 4, 83 | "nbformat_minor": 4 84 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/template.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # In[1]: 5 | 6 | 7 | # Install necessary libraries 8 | 9 | try: 10 | import jax 11 | except: 12 | # For cuda version, see https://github.com/google/jax#installation 13 | get_ipython().run_line_magic('pip', 'install --upgrade "jax[cpu]"') 14 | import jax 15 | 16 | try: 17 | import jsl 18 | except: 19 | get_ipython().run_line_magic('pip', 'install git+https://github.com/probml/jsl') 20 | import jsl 21 | 22 | try: 23 | import rich 24 | except: 25 | get_ipython().run_line_magic('pip', 'install rich') 26 | import rich 27 | 28 | 29 | # In[2]: 30 | 31 | 32 | # Import standrd libraries 33 | 34 | import abc 35 | from dataclasses import dataclass 36 | import functools 37 | import itertools 38 | 39 | from typing import Any, Callable, NamedTuple, Optional, Union, Tuple 40 | 41 | 42 | import jax 43 | import jax.numpy as jnp 44 | import matplotlib.pyplot as plt 45 | import numpy as np 46 | 47 | import inspect 48 | import inspect as py_inspect 49 | 50 | from rich import inspect as r_inspect 51 | from rich import print as r_print 52 | 53 | def print_source(fname): 54 | r_print(py_inspect.getsource(fname)) 55 | 56 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/unscented/unscented_filter.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Unscented filtering" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/unscented/unscented_filter.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Unscented filtering 5 | -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/unscented/unscented_smoother.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Unscented smoothing" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } -------------------------------------------------------------------------------- /_build/jupyter_execute/chapters/unscented/unscented_smoother.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Unscented smoothing 5 | -------------------------------------------------------------------------------- /_build/jupyter_execute/kevin.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Kevin's noodling 5 | # 6 | # In this chapter, we do blah. 7 | # For more details, see [](sec:bar), where we discuss bar. 8 | # 9 | # 10 | # ## Python 11 | 12 | # In[1]: 13 | 14 | 15 | from matplotlib import rcParams, cycler 16 | import matplotlib.pyplot as plt 17 | import numpy as np 18 | plt.ion() 19 | 20 | 21 | # In[2]: 22 | 23 | 24 | # Fixing random state for reproducibility 25 | np.random.seed(19680801) 26 | 27 | N = 10 28 | data = [np.logspace(0, 1, 100) + np.random.randn(100) + ii for ii in range(N)] 29 | data = np.array(data).T 30 | cmap = plt.cm.coolwarm 31 | rcParams['axes.prop_cycle'] = cycler(color=cmap(np.linspace(0, 1, N))) 32 | 33 | 34 | from matplotlib.lines import Line2D 35 | custom_lines = [Line2D([0], [0], color=cmap(0.), lw=4), 36 | Line2D([0], [0], color=cmap(.5), lw=4), 37 | Line2D([0], [0], color=cmap(1.), lw=4)] 38 | 39 | fig, ax = plt.subplots(figsize=(10, 5)) 40 | lines = ax.plot(data) 41 | ax.legend(custom_lines, ['Cold', 'Medium', 'Hot']); 42 | 43 | 44 | # ## Images 45 | # 46 | # [](https://myst-parser.readthedocs.io/en/latest/_static/logo-wide.svg) 47 | # 48 | # ![](https://myst-parser.readthedocs.io/en/latest/_static/logo-wide.svg) 49 | # 50 | # 52 | # 53 | # 54 | # ## Math 55 | # 56 | # $$ 57 | # a x^2 + bx+ c = 0 58 | # $$ 59 | # 60 | # $$ 61 | # \begin{align} 62 | # 0 &= a x^2 + bx+ c \\ 63 | # 0 &= a x^2 + bx+ c 64 | # \end{align} 65 | # $$ 66 | # 67 | # ## Refs 68 | # 69 | # For more details, see {cite}`holdgraf_evidence_2014` and foo. 70 | -------------------------------------------------------------------------------- /_build/jupyter_execute/kevin_2_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/jupyter_execute/kevin_2_0.png -------------------------------------------------------------------------------- /_build/jupyter_execute/markdown-notebooks.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Notebooks with MyST Markdown 5 | # 6 | # Jupyter Book also lets you write text-based notebooks using MyST Markdown. 7 | # See [the Notebooks with MyST Markdown documentation](https://jupyterbook.org/file-types/myst-notebooks.html) for more detailed instructions. 8 | # This page shows off a notebook written in MyST Markdown. 9 | # 10 | # ## An example cell 11 | # 12 | # With MyST Markdown, you can define code cells with a directive like so: 13 | 14 | # In[1]: 15 | 16 | 17 | print(2 + 2) 18 | 19 | 20 | # When your book is built, the contents of any `{code-cell}` blocks will be 21 | # executed with your default Jupyter kernel, and their outputs will be displayed 22 | # in-line with the rest of your content. 23 | # 24 | # ```{seealso} 25 | # Jupyter Book uses [Jupytext](https://jupytext.readthedocs.io/en/latest/) to convert text-based files to notebooks, and can support [many other text-based notebook files](https://jupyterbook.org/file-types/jupytext.html). 26 | # ``` 27 | # 28 | # ## Create a notebook with MyST Markdown 29 | # 30 | # MyST Markdown notebooks are defined by two things: 31 | # 32 | # 1. YAML metadata that is needed to understand if / how it should convert text files to notebooks (including information about the kernel needed). 33 | # See the YAML at the top of this page for example. 34 | # 2. The presence of `{code-cell}` directives, which will be executed with your book. 35 | # 36 | # That's all that is needed to get started! 37 | # 38 | # ## Quickly add YAML metadata for MyST Notebooks 39 | # 40 | # If you have a markdown file and you'd like to quickly add YAML metadata to it, so that Jupyter Book will treat it as a MyST Markdown Notebook, run the following command: 41 | # 42 | # ``` 43 | # jupyter-book myst init path/to/markdownfile.md 44 | # ``` 45 | -------------------------------------------------------------------------------- /_build/jupyter_execute/markdown-notebooks_4_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/jupyter_execute/markdown-notebooks_4_0.png -------------------------------------------------------------------------------- /_build/jupyter_execute/notebooks.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf-8 3 | 4 | # # Content with notebooks 5 | # 6 | # You can also create content with Jupyter Notebooks. This means that you can include 7 | # code blocks and their outputs in your book. 8 | # 9 | # ## Markdown + notebooks 10 | # 11 | # As it is markdown, you can embed images, HTML, etc into your posts! 12 | # 13 | # ![](https://myst-parser.readthedocs.io/en/latest/_static/logo-wide.svg) 14 | # 15 | # You can also $add_{math}$ and 16 | # 17 | # $$ 18 | # math^{blocks} 19 | # $$ 20 | # 21 | # or 22 | # 23 | # $$ 24 | # \begin{aligned} 25 | # \mbox{mean} la_{tex} \\ \\ 26 | # math blocks 27 | # \end{aligned} 28 | # $$ 29 | # 30 | # But make sure you \$Escape \$your \$dollar signs \$you want to keep! 31 | # 32 | # ## MyST markdown 33 | # 34 | # MyST markdown works in Jupyter Notebooks as well. For more information about MyST markdown, check 35 | # out [the MyST guide in Jupyter Book](https://jupyterbook.org/content/myst.html), 36 | # or see [the MyST markdown documentation](https://myst-parser.readthedocs.io/en/latest/). 37 | # 38 | # ## Code blocks and outputs 39 | # 40 | # Jupyter Book will also embed your code blocks and output in your book. 41 | # For example, here's some sample Matplotlib code: 42 | 43 | # In[1]: 44 | 45 | 46 | from matplotlib import rcParams, cycler 47 | import matplotlib.pyplot as plt 48 | import numpy as np 49 | plt.ion() 50 | 51 | 52 | # In[2]: 53 | 54 | 55 | # Fixing random state for reproducibility 56 | np.random.seed(19680801) 57 | 58 | N = 10 59 | data = [np.logspace(0, 1, 100) + np.random.randn(100) + ii for ii in range(N)] 60 | data = np.array(data).T 61 | cmap = plt.cm.coolwarm 62 | rcParams['axes.prop_cycle'] = cycler(color=cmap(np.linspace(0, 1, N))) 63 | 64 | 65 | from matplotlib.lines import Line2D 66 | custom_lines = [Line2D([0], [0], color=cmap(0.), lw=4), 67 | Line2D([0], [0], color=cmap(.5), lw=4), 68 | Line2D([0], [0], color=cmap(1.), lw=4)] 69 | 70 | fig, ax = plt.subplots(figsize=(10, 5)) 71 | lines = ax.plot(data) 72 | ax.legend(custom_lines, ['Cold', 'Medium', 'Hot']); 73 | 74 | 75 | # There is a lot more that you can do with outputs (such as including interactive outputs) 76 | # with your book. For more information about this, see [the Jupyter Book documentation](https://jupyterbook.org) 77 | -------------------------------------------------------------------------------- /_build/jupyter_execute/notebooks_2_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/_build/jupyter_execute/notebooks_2_0.png -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | # Book settings 2 | # Learn more at https://jupyterbook.org/customize/config.html 3 | 4 | title: "State Space Models: A Modern Approach" 5 | author: Kevin Murphy, Scott Linderman, et al. 6 | logo: logo.png 7 | 8 | # Force re-execution of notebooks on each build. 9 | # See https://jupyterbook.org/content/execute.html 10 | execute: 11 | execute_notebooks: force 12 | 13 | # Define the name of the latex output file for PDF builds 14 | latex: 15 | latex_documents: 16 | targetname: book.tex 17 | 18 | # Add a bibtex file so that we can create citations 19 | bibtex_bibfiles: 20 | - references.bib 21 | 22 | # Information about where the book exists on the web 23 | repository: 24 | url: https://github.com/ssm-jax/ssm-book 25 | branch: main 26 | 27 | launch_buttons: 28 | colab_url: "https://colab.research.google.com" 29 | 30 | # Add GitHub buttons to your book 31 | # See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository 32 | html: 33 | use_issues_button: true 34 | use_repository_button: true 35 | -------------------------------------------------------------------------------- /_toc.yml: -------------------------------------------------------------------------------- 1 | # Table of contents 2 | # Learn more at https://jupyterbook.org/customize/toc.html 3 | 4 | format: jb-book 5 | root: root 6 | chapters: 7 | - file: chapters/scratch 8 | - file: chapters/ssm/ssm_index 9 | sections: 10 | - file: chapters/ssm/hmm 11 | - file: chapters/ssm/hsmm 12 | - file: chapters/ssm/lgssm 13 | - file: chapters/ssm/nonlin 14 | - file: chapters/ssm/nongauss 15 | - file: chapters/ssm/switching 16 | - file: chapters/ssm/deep 17 | - file: chapters/ssm/rnn 18 | - file: chapters/hmm/hmm_index 19 | sections: 20 | - file: chapters/hmm/hmm_filter 21 | - file: chapters/hmm/hmm_smoother 22 | - file: chapters/hmm/hmm_viterbi 23 | - file: chapters/hmm/hmm_parallel 24 | - file: chapters/hmm/hmm_sampling 25 | # - file: chapters/hmm/hmm_discrete_numpy 26 | - file: chapters/lgssm/lgssm_index 27 | sections: 28 | - file: chapters/lgssm/kalman_filter 29 | - file: chapters/lgssm/kalman_smoother 30 | - file: chapters/lgssm/kalman_parallel 31 | - file: chapters/lgssm/kalman_sampling 32 | - file: chapters/extended/extended_index 33 | sections: 34 | - file: chapters/extended/extended_filter 35 | - file: chapters/extended/extended_smoother 36 | - file: chapters/extended/extended_parallel 37 | - file: chapters/unscented/unscented_index 38 | sections: 39 | - file: chapters/unscented/unscented_filter 40 | - file: chapters/unscented/unscented_smoother 41 | - file: chapters/quadrature/quadrature_index 42 | - file: chapters/postlin/postlin_index 43 | - file: chapters/adf/adf_index 44 | - file: chapters/vi/vi_index 45 | - file: chapters/pf/pf_index 46 | - file: chapters/smc/smc_index 47 | - file: chapters/learning/learning_index 48 | sections: 49 | - file: chapters/learning/em 50 | - file: chapters/learning/sgd 51 | - file: chapters/learning/vb 52 | - file: chapters/learning/mcmc 53 | - file: chapters/tracking/tracking_index 54 | - file: chapters/ensemble/ensemble_index 55 | - file: chapters/bnp/bnp_index 56 | - file: chapters/changepoint/changepoint_index 57 | - file: chapters/timeseries/timeseries_index 58 | - file: chapters/gp/gp_index 59 | - file: chapters/ode/ode_index 60 | - file: chapters/control/control_index 61 | - file: bib -------------------------------------------------------------------------------- /bib.md: -------------------------------------------------------------------------------- 1 | # Bibliography 2 | 3 | 4 | ```{bibliography} 5 | ``` 6 | -------------------------------------------------------------------------------- /chapters/adf/adf_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:ADF)= 4 | # Assumed Density Filtering 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /chapters/blank.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "(chap:my-chap)=\n", 8 | "# Chapter title\n", 9 | "\n" 10 | ] 11 | }, 12 | { 13 | "cell_type": "markdown", 14 | "metadata": {}, 15 | "source": [] 16 | } 17 | ], 18 | "metadata": { 19 | "kernelspec": { 20 | "display_name": "Python 3", 21 | "language": "python", 22 | "name": "python3" 23 | }, 24 | "language_info": { 25 | "codemirror_mode": { 26 | "name": "ipython", 27 | "version": 3 28 | }, 29 | "file_extension": ".py", 30 | "mimetype": "text/x-python", 31 | "name": "python", 32 | "nbconvert_exporter": "python", 33 | "pygments_lexer": "ipython3", 34 | "version": "3.8.5" 35 | } 36 | }, 37 | "nbformat": 4, 38 | "nbformat_minor": 4 39 | } 40 | -------------------------------------------------------------------------------- /chapters/bnp/bnp_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:BNP)= 4 | # Bayesian non-parametric SSMs 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /chapters/changepoint/changepoint_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:changepoint)= 4 | # Changepoint detection 5 | 6 | 7 | 8 | {cite}`Agudelo-Espana2020`, {cite}`Adams2007`, {cite}`Fearnhead04`, {cite}`Fearnhead06`, {cite}`Fearnhead07`, 9 | {cite}`Fearnhead11` 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /chapters/control/control_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:control)= 4 | # Optimal control 5 | 6 | 7 | {cite}`Botvinick2012`, {cite}`Kappen2012`, {cite}`Rawlik2012` 8 | 9 | ## LQR 10 | 11 | ## MPC 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /chapters/ensemble/ensemble_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:ensemble)= 4 | # Data assimilation using Ensemble Kalman filter 5 | 6 | 7 | {cite}`Evensen2009`, {cite}`Roth2017enkf` 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /chapters/extended/extended_filter.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Extended Kalman filtering" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } 33 | -------------------------------------------------------------------------------- /chapters/extended/extended_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:extended)= 4 | # Extended (linearized) methods 5 | 6 | ```{tableofcontents} 7 | ``` -------------------------------------------------------------------------------- /chapters/extended/extended_parallel.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Parallel extended Kalman smoothing\n", 8 | "\n", 9 | "{cite}`Sarkka2020icassp`\n" 10 | ] 11 | } 12 | ], 13 | "metadata": { 14 | "kernelspec": { 15 | "display_name": "Python 3", 16 | "language": "python", 17 | "name": "python3" 18 | }, 19 | "language_info": { 20 | "codemirror_mode": { 21 | "name": "ipython", 22 | "version": 3 23 | }, 24 | "file_extension": ".py", 25 | "mimetype": "text/x-python", 26 | "name": "python", 27 | "nbconvert_exporter": "python", 28 | "pygments_lexer": "ipython3", 29 | "version": "3.8.5" 30 | } 31 | }, 32 | "nbformat": 4, 33 | "nbformat_minor": 4 34 | } 35 | -------------------------------------------------------------------------------- /chapters/extended/extended_smoother.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Extended Kalman smoother" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } 33 | -------------------------------------------------------------------------------- /chapters/gp/gp_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:GP)= 4 | # Markovian Gaussian processes 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /chapters/hmm/hmm_filter.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# HMM filtering (forwards algorithm)\n" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } 33 | -------------------------------------------------------------------------------- /chapters/hmm/hmm_index.md: -------------------------------------------------------------------------------- 1 | (ch:hmm)= 2 | # Inference in discrete SSMs 3 | 4 | This chapter covers inference in HMMs. 5 | 6 | 7 | ```{tableofcontents} 8 | ``` 9 | 10 | See (sec:casino-ex). 11 | -------------------------------------------------------------------------------- /chapters/hmm/hmm_parallel.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Parallel HMM smoothing\n", 8 | "\n", 9 | "{cite}`Hassan2021`\n", 10 | "\n", 11 | "\n" 12 | ] 13 | } 14 | ], 15 | "metadata": { 16 | "kernelspec": { 17 | "display_name": "Python 3", 18 | "language": "python", 19 | "name": "python3" 20 | }, 21 | "language_info": { 22 | "codemirror_mode": { 23 | "name": "ipython", 24 | "version": 3 25 | }, 26 | "file_extension": ".py", 27 | "mimetype": "text/x-python", 28 | "name": "python", 29 | "nbconvert_exporter": "python", 30 | "pygments_lexer": "ipython3", 31 | "version": "3.8.5" 32 | } 33 | }, 34 | "nbformat": 4, 35 | "nbformat_minor": 4 36 | } 37 | -------------------------------------------------------------------------------- /chapters/hmm/hmm_sampling.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Forwards-filtering backwards-sampling algorithm\n" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } 33 | -------------------------------------------------------------------------------- /chapters/hmm/hmm_smoother.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# HMM smoothing (forwards-backwards algorithm)\n" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "## Forwards filter, backwards smoother algorithm" 15 | ] 16 | }, 17 | { 18 | "cell_type": "markdown", 19 | "metadata": {}, 20 | "source": [ 21 | "## Two-filter algorithm" 22 | ] 23 | }, 24 | { 25 | "cell_type": "markdown", 26 | "metadata": {}, 27 | "source": [] 28 | } 29 | ], 30 | "metadata": { 31 | "kernelspec": { 32 | "display_name": "Python 3", 33 | "language": "python", 34 | "name": "python3" 35 | }, 36 | "language_info": { 37 | "codemirror_mode": { 38 | "name": "ipython", 39 | "version": 3 40 | }, 41 | "file_extension": ".py", 42 | "mimetype": "text/x-python", 43 | "name": "python", 44 | "nbconvert_exporter": "python", 45 | "pygments_lexer": "ipython3", 46 | "version": "3.8.5" 47 | } 48 | }, 49 | "nbformat": 4, 50 | "nbformat_minor": 4 51 | } 52 | -------------------------------------------------------------------------------- /chapters/hmm/hmm_viterbi.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Viterbi algorithm\n" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } 33 | -------------------------------------------------------------------------------- /chapters/learning/em.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "(sec:em)=\n", 8 | "# Expectation Maximization (EM)\n", 9 | "\n", 10 | "{cite}`Ghahramani96a`\n" 11 | ] 12 | } 13 | ], 14 | "metadata": { 15 | "kernelspec": { 16 | "display_name": "Python 3", 17 | "language": "python", 18 | "name": "python3" 19 | }, 20 | "language_info": { 21 | "codemirror_mode": { 22 | "name": "ipython", 23 | "version": 3 24 | }, 25 | "file_extension": ".py", 26 | "mimetype": "text/x-python", 27 | "name": "python", 28 | "nbconvert_exporter": "python", 29 | "pygments_lexer": "ipython3", 30 | "version": "3.8.8" 31 | } 32 | }, 33 | "nbformat": 4, 34 | "nbformat_minor": 4 35 | } 36 | -------------------------------------------------------------------------------- /chapters/learning/learning_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:learning)= 4 | # Offline parameter estimation (learning) 5 | 6 | ```{tableofcontents} 7 | ``` 8 | -------------------------------------------------------------------------------- /chapters/learning/mcmc.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "(sec:mcmc)=\n", 8 | "# Markov Chain Monte Carlo (MCMC)\n", 9 | "\n" 10 | ] 11 | } 12 | ], 13 | "metadata": { 14 | "kernelspec": { 15 | "display_name": "Python 3", 16 | "language": "python", 17 | "name": "python3" 18 | }, 19 | "language_info": { 20 | "codemirror_mode": { 21 | "name": "ipython", 22 | "version": 3 23 | }, 24 | "file_extension": ".py", 25 | "mimetype": "text/x-python", 26 | "name": "python", 27 | "nbconvert_exporter": "python", 28 | "pygments_lexer": "ipython3", 29 | "version": "3.8.8" 30 | } 31 | }, 32 | "nbformat": 4, 33 | "nbformat_minor": 4 34 | } 35 | -------------------------------------------------------------------------------- /chapters/learning/sgd.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "(sec:sgd)=\n", 8 | "# Stochastic Gradient Descent (SGD)\n", 9 | "\n" 10 | ] 11 | } 12 | ], 13 | "metadata": { 14 | "kernelspec": { 15 | "display_name": "Python 3", 16 | "language": "python", 17 | "name": "python3" 18 | }, 19 | "language_info": { 20 | "codemirror_mode": { 21 | "name": "ipython", 22 | "version": 3 23 | }, 24 | "file_extension": ".py", 25 | "mimetype": "text/x-python", 26 | "name": "python", 27 | "nbconvert_exporter": "python", 28 | "pygments_lexer": "ipython3", 29 | "version": "3.8.8" 30 | } 31 | }, 32 | "nbformat": 4, 33 | "nbformat_minor": 4 34 | } 35 | -------------------------------------------------------------------------------- /chapters/learning/vb.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "\n", 8 | "(sec:VB)=\n", 9 | "# Variational Bayes (VB)\n", 10 | "\n" 11 | ] 12 | } 13 | ], 14 | "metadata": { 15 | "kernelspec": { 16 | "display_name": "Python 3", 17 | "language": "python", 18 | "name": "python3" 19 | }, 20 | "language_info": { 21 | "codemirror_mode": { 22 | "name": "ipython", 23 | "version": 3 24 | }, 25 | "file_extension": ".py", 26 | "mimetype": "text/x-python", 27 | "name": "python", 28 | "nbconvert_exporter": "python", 29 | "pygments_lexer": "ipython3", 30 | "version": "3.8.8" 31 | } 32 | }, 33 | "nbformat": 4, 34 | "nbformat_minor": 4 35 | } 36 | -------------------------------------------------------------------------------- /chapters/lgssm/kalman_filter.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Kalman filtering" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } 33 | -------------------------------------------------------------------------------- /chapters/lgssm/kalman_parallel.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Parallel Kalman Smoother\n", 8 | "\n", 9 | "{cite}`Sarkka2021`\n", 10 | "\n", 11 | "\n", 12 | "\n" 13 | ] 14 | } 15 | ], 16 | "metadata": { 17 | "kernelspec": { 18 | "display_name": "Python 3", 19 | "language": "python", 20 | "name": "python3" 21 | }, 22 | "language_info": { 23 | "codemirror_mode": { 24 | "name": "ipython", 25 | "version": 3 26 | }, 27 | "file_extension": ".py", 28 | "mimetype": "text/x-python", 29 | "name": "python", 30 | "nbconvert_exporter": "python", 31 | "pygments_lexer": "ipython3", 32 | "version": "3.8.5" 33 | } 34 | }, 35 | "nbformat": 4, 36 | "nbformat_minor": 4 37 | } 38 | -------------------------------------------------------------------------------- /chapters/lgssm/kalman_sampling.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Forwards-filtering backwards sampling" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } 33 | -------------------------------------------------------------------------------- /chapters/lgssm/kalman_smoother.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Kalman (RTS) smoother" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } 33 | -------------------------------------------------------------------------------- /chapters/lgssm/lgssm_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:lgssm)= 4 | # Inference in linear-Gaussian SSMs 5 | 6 | ```{tableofcontents} 7 | ``` -------------------------------------------------------------------------------- /chapters/ode/ode_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:ODE)= 4 | # Differential equations and SSMs 5 | 6 | 7 | {cite}`Tronarp2019`, {cite}`Sarkka2019book`, {cite}`HennigBook` 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /chapters/pf/pf_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:PF)= 4 | # Particle filtering 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /chapters/postlin/postlin_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:postlin)= 4 | # Posterior linearization 5 | 6 | 7 | {cite}`Garcia-Fernandez2017`, {cite}`Tronarp2018`, {cite}`Garcia-Fernandez2019` 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /chapters/quadrature/quadrature_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:quadrature)= 4 | # Quadrature and cubature methods 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /chapters/scratch.md: -------------------------------------------------------------------------------- 1 | --- 2 | jupytext: 3 | cell_metadata_filter: -all 4 | formats: md:myst 5 | text_representation: 6 | extension: .md 7 | format_name: myst 8 | kernelspec: 9 | display_name: Python 3 10 | language: python 11 | name: python3 12 | --- 13 | 14 | (ch:intro)= 15 | # Scratchpad 16 | 17 | 18 | In this chapter, we do blah. 19 | Specifically 20 | 21 | - foo 22 | - bar. 23 | - baz 24 | 25 | For more details, see 26 | {ref}`ch:hmm` and {cite}`Sarkka13`. 27 | 28 | 29 | ## Python 30 | 31 | We\'re now ready to start coding. 32 | 33 | ```{code-cell} 34 | from matplotlib import rcParams, cycler 35 | import matplotlib.pyplot as plt 36 | import numpy as np 37 | plt.ion() 38 | ``` 39 | 40 | ```{code-cell} 41 | # Fixing random state for reproducibility 42 | np.random.seed(19680801) 43 | 44 | N = 10 45 | data = [np.logspace(0, 1, 100) + np.random.randn(100) + ii for ii in range(N)] 46 | data = np.array(data).T 47 | cmap = plt.cm.coolwarm 48 | rcParams['axes.prop_cycle'] = cycler(color=cmap(np.linspace(0, 1, N))) 49 | 50 | 51 | from matplotlib.lines import Line2D 52 | custom_lines = [Line2D([0], [0], color=cmap(0.), lw=4), 53 | Line2D([0], [0], color=cmap(.5), lw=4), 54 | Line2D([0], [0], color=cmap(1.), lw=4)] 55 | 56 | fig, ax = plt.subplots(figsize=(10, 5)) 57 | lines = ax.plot(data) 58 | ax.legend(custom_lines, ['Cold', 'Medium', 'Hot']); 59 | ``` 60 | 61 | ```{code-cell} 62 | import matplotlib.pyplot as plt 63 | import numpy as np 64 | import jax 65 | import jax.numpy as jnp 66 | 67 | print(jax.devices()) 68 | ``` 69 | 70 | ## Images 71 | 72 | 73 | 80 | 81 | ```{figure} /figures/cat_dog.jpg 82 | :scale: 50% 83 | :name: cat_dog 84 | 85 | A photo of a cat and a dog. 86 | ``` 87 | 88 | ```{figure} /figures/cat_dog.jpg 89 | :scale: 50% 90 | :name: cat_dog2 91 | 92 | Another photo of a cat and a dog. 93 | ``` 94 | 95 | In {numref}`Figure %s ` we show catdog. 96 | In {numref}`Figure %s ` we show catdog2, its twin. 97 | 98 | 99 | ## Math 100 | 101 | We have $E= mc^2$, and also 102 | 103 | ```{math} 104 | :label: foo 105 | a x^2 + bx+ c = 0 106 | ``` 107 | 108 | From {eq}`foo`, it follows that 109 | 110 | $$ 111 | \begin{align} 112 | 0 &= a x^2 + bx+ c \\ 113 | 0 &= a x^2 + bx+ c 114 | \end{align} 115 | $$ 116 | 117 | -------------------------------------------------------------------------------- /chapters/smc/smc_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:SMC)= 4 | # Sequential Monte Carlo 5 | 6 | {cite}`Chopin2020` 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /chapters/ssm/deep.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Deep SSMs\n" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [] 14 | } 15 | ], 16 | "metadata": { 17 | "kernelspec": { 18 | "display_name": "Python 3", 19 | "language": "python", 20 | "name": "python3" 21 | }, 22 | "language_info": { 23 | "codemirror_mode": { 24 | "name": "ipython", 25 | "version": 3 26 | }, 27 | "file_extension": ".py", 28 | "mimetype": "text/x-python", 29 | "name": "python", 30 | "nbconvert_exporter": "python", 31 | "pygments_lexer": "ipython3", 32 | "version": "3.8.5" 33 | } 34 | }, 35 | "nbformat": 4, 36 | "nbformat_minor": 4 37 | } 38 | -------------------------------------------------------------------------------- /chapters/ssm/hsmm.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Hidden Semi-Markov Models\n", 8 | "\n" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.8.5" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 4 33 | } 34 | -------------------------------------------------------------------------------- /chapters/ssm/lgssm.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Linear Gaussian SSMs\n" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [] 14 | } 15 | ], 16 | "metadata": { 17 | "kernelspec": { 18 | "display_name": "Python 3", 19 | "language": "python", 20 | "name": "python3" 21 | }, 22 | "language_info": { 23 | "codemirror_mode": { 24 | "name": "ipython", 25 | "version": 3 26 | }, 27 | "file_extension": ".py", 28 | "mimetype": "text/x-python", 29 | "name": "python", 30 | "nbconvert_exporter": "python", 31 | "pygments_lexer": "ipython3", 32 | "version": "3.8.5" 33 | } 34 | }, 35 | "nbformat": 4, 36 | "nbformat_minor": 4 37 | } 38 | -------------------------------------------------------------------------------- /chapters/ssm/nongauss.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Non-Gaussian SSMs\n" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [] 14 | } 15 | ], 16 | "metadata": { 17 | "kernelspec": { 18 | "display_name": "Python 3", 19 | "language": "python", 20 | "name": "python3" 21 | }, 22 | "language_info": { 23 | "codemirror_mode": { 24 | "name": "ipython", 25 | "version": 3 26 | }, 27 | "file_extension": ".py", 28 | "mimetype": "text/x-python", 29 | "name": "python", 30 | "nbconvert_exporter": "python", 31 | "pygments_lexer": "ipython3", 32 | "version": "3.8.5" 33 | } 34 | }, 35 | "nbformat": 4, 36 | "nbformat_minor": 4 37 | } 38 | -------------------------------------------------------------------------------- /chapters/ssm/nonlin.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Non-Linear Gaussian SSMs\n" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } 33 | -------------------------------------------------------------------------------- /chapters/ssm/rnn.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Recurrent Neural Networks\n" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [] 14 | } 15 | ], 16 | "metadata": { 17 | "kernelspec": { 18 | "display_name": "Python 3", 19 | "language": "python", 20 | "name": "python3" 21 | }, 22 | "language_info": { 23 | "codemirror_mode": { 24 | "name": "ipython", 25 | "version": 3 26 | }, 27 | "file_extension": ".py", 28 | "mimetype": "text/x-python", 29 | "name": "python", 30 | "nbconvert_exporter": "python", 31 | "pygments_lexer": "ipython3", 32 | "version": "3.8.5" 33 | } 34 | }, 35 | "nbformat": 4, 36 | "nbformat_minor": 4 37 | } 38 | -------------------------------------------------------------------------------- /chapters/ssm/ssm_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:ssm)= 4 | # Introduction 5 | 6 | ```{tableofcontents} 7 | ``` 8 | -------------------------------------------------------------------------------- /chapters/ssm/switching.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Switching SSMs\n" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "## Jump Markov Linear Dynamical Systems" 15 | ] 16 | }, 17 | { 18 | "cell_type": "markdown", 19 | "metadata": {}, 20 | "source": [] 21 | } 22 | ], 23 | "metadata": { 24 | "kernelspec": { 25 | "display_name": "Python 3", 26 | "language": "python", 27 | "name": "python3" 28 | }, 29 | "language_info": { 30 | "codemirror_mode": { 31 | "name": "ipython", 32 | "version": 3 33 | }, 34 | "file_extension": ".py", 35 | "mimetype": "text/x-python", 36 | "name": "python", 37 | "nbconvert_exporter": "python", 38 | "pygments_lexer": "ipython3", 39 | "version": "3.8.5" 40 | } 41 | }, 42 | "nbformat": 4, 43 | "nbformat_minor": 4 44 | } 45 | -------------------------------------------------------------------------------- /chapters/timeseries/timeseries_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:timeseries)= 4 | # Timeseries forecasting 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /chapters/tracking/tracking_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:tracking)= 4 | # Multi-target tracking 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /chapters/unscented/unscented_filter.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Unscented filtering" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } 33 | -------------------------------------------------------------------------------- /chapters/unscented/unscented_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:unscented)= 4 | # Unscented methods 5 | 6 | ```{tableofcontents} 7 | ``` -------------------------------------------------------------------------------- /chapters/unscented/unscented_smoother.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Unscented smoothing" 8 | ] 9 | } 10 | ], 11 | "metadata": { 12 | "kernelspec": { 13 | "display_name": "Python 3", 14 | "language": "python", 15 | "name": "python3" 16 | }, 17 | "language_info": { 18 | "codemirror_mode": { 19 | "name": "ipython", 20 | "version": 3 21 | }, 22 | "file_extension": ".py", 23 | "mimetype": "text/x-python", 24 | "name": "python", 25 | "nbconvert_exporter": "python", 26 | "pygments_lexer": "ipython3", 27 | "version": "3.8.5" 28 | } 29 | }, 30 | "nbformat": 4, 31 | "nbformat_minor": 4 32 | } 33 | -------------------------------------------------------------------------------- /chapters/vi/vi_index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | (ch:VI)= 4 | # Variational inference 5 | 6 | {cite}`BayesNewton`, 7 | {cite}`Courts2020`, {cite}`Courts2021` 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /figures/casino.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/figures/casino.pdf -------------------------------------------------------------------------------- /figures/casino.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/figures/casino.png -------------------------------------------------------------------------------- /figures/cat_dog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssm-jax/ssm-book/f3bfa29a1c474b7dc85792a563df0f29736a44c6/figures/cat_dog.jpg -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | jupyter-book 2 | matplotlib 3 | numpy 4 | -------------------------------------------------------------------------------- /root.md: -------------------------------------------------------------------------------- 1 | # State Space Models: A Modern Approach 2 | 3 | This is an interactive textbook on state space models (SSM) 4 | using the [JAX Python library](https://github.com/google/jax). 5 | Some of the content is covered in other books 6 | such as {cite}`Sarkka13` and {cite}`vol2`. 7 | However, we go into more detail, and focus on how to efficiently 8 | implement the various algorithms in a "modern" computing environment, 9 | exploiting recent progress 10 | in automatic differentiation and parallel computing. 11 | 12 | 13 | ```{tableofcontents} 14 | ``` 15 | --------------------------------------------------------------------------------