Bayesian workflow
=================
Welcome to the Bayesian workflow course. Here, you can browse and search the course notebooks.
This course is part of the ORIGINS Data Science Laboratory's Block courses. Please see the `main course page `_ for more information.
Installation
------------
To run the course notebooks, you have a few different options. I recommend to follow the standard install, and use docker or binder if there are problems.
.. note::
The notebooks have been tested with Python 3.9 and updates may need to be made to for Python > 3.9 to work.
* **Plan A - Standard install:** Fork/clone/download material from this `GitHub repository `_, everything you need is in ``src/notebooks``
* I recommend using a `virtual environment `_ if possible
* Install the basics if necessary: ``pip install numpy scipy matplotlib``
* Install: ``pip install cython==0.29.24 cmdstanpy==0.9.76 arviz==0.11.2 ultranest==3.3.0``
* Run ``install_cmdstan`` (as described in the `cmdstanpy docs `_)
* If using a virtual environment, set up an ipython kernel with this environment (as described `here `_)
* Open a notebook using jupyter, select correct kernel and get running
* **Plan B - Docker:** Fork/clone/download material from this `GitHub repository `_, everything you need is in ``src/notebooks``
* Install `docker `_ on your computer
* Get a ready made docker enironment: ``docker pull cescalara/bayesian_workflow``
* Run ``docker run -p 8888:8888 -v "${PWD}":/home/jovyan/work cescalara/bayesian_workflow jupyter-notebook --allow-root``
* Open the given url ``http://127.0.0.1:8888/lab?token=....`` in your browser
* The current directory will be mounted to the docker and the jupyter server has the environment needed to run the notebooks
* **Plan C - Binder:** Click `here `_ to launch a working environment via binder, all notebooks are in ``work/``
* The binder may take a while to load, this is normal
* Using binder you will automatically time out of sessions if you are inactive for more than 10 minutes, so save your work frequently
* The changes that you make are *not persistent* - if you close and repoen a tab your changes will be lost
* To work continuously, download and upload your changes between active sessions
Solutions
---------
Complete solutions to the notebooks can be made available upon request. Please contact f.capel@tum.de.
Acknowledgements
----------------
I would like to highlight the `many resources `_ of Michael Betancourt and the `KIPAC Statistical Methods course `_ as providing inspiration for the course structure and content.
.. toctree::
:maxdepth: 1
:caption: Contents:
notebooks/introduction.ipynb
notebooks/model_building.ipynb
notebooks/model_checking.ipynb
notebooks/model_development.ipynb
notebooks/model_comparison_part1.ipynb
notebooks/example-sine-modelcomparison.ipynb
notebooks/experiment_design.ipynb
notebooks/homework_project.ipynb