This repository contains lecture materials for the Probabilistic Inference lecture (currently WS 23/24) at Uni Jena.
For an overview over the lecture, have a look at Overview.md
The lecture is written using quarto. To render the lecture(s) to different output formats (pdf, html, jupyter notebooks, ...)
you need to install quarto
(see below).
The main file is called lecture.qmd, which is a short file that simply includes all files in the lectures folder. The lecture folder contains one file for each lecture/day.
The lecture can be rendered to different output formats using quarto
- Install quarto
- Install python dependencies
- It's best to do this in a dedicated virtual (python-) environment. See below how to create one.
- Install all required dependencies
- To install the exact requirements used by the authors:
pip install -r requirements.txt
- To install the exact requirements used by the authors:
- If you want to render the lecture to pdf, you also need a working distribution of TeX.
- If you don't have TeX installed, the easiest way to do this is to run
quarto install tool tinytex
- See the relevant section of the quarto documentation for more details.
- If you don't have TeX installed, the easiest way to do this is to run
Rendering the lecture to a large number of output formats is then as easy as (assuming you're in the repository's root folder):
quarto render --to html
to render to html (a website). This will create a file called lecture.html
in the same folder, which you can open with your browser.
Or:
quarto render --to pdf
which will create a single pdf file lecture.pdf
(note that you need a working TeX installation for pdf output to work, as discussed in prerequisites).
Refer to the quarto documentation for other output options.
You can render the files for each lecture day individually, e.g.:
quarto render lectures/01-Introduction.qmd --to pdf
which puts the pdf file 01-Introduction.pdf
into the lectures folder.
You can also convert the lecture files to jupyter notebooks, which allows you to play with the code yourself!
quarto convert lectures/02-Direct-Sampling-Methods.qmd
This places a new file 02-Direct-Sampling-Methods.ipynb
in the lectures folder.
It's best practice to have a separate (virtual) environment for each python project.
To create a new virtual environment called env
in your current folder (e.g. in this project's root folder), run:
python -m venv env
you need to do this only once.
Each time you want to change in your new virtual environment, go to the folder in which you created your environment
(The folder containing the folder env
, if you created your environment like above)
and run
. env/bin/activate
Note the .
at the beginning!
This activates your virtual environment. Now you're ready to
- install the prerequisites inside your virtual environment (only need to do that once.)
- render the lecture using
quarto
as described above.