Production-style implementations of selected coursework from the Probabilistic Artificial Intelligence course at ETH Zürich, packaged as a single Python project.
- Bayesian inference — log-posterior over competing generative models
- Gaussian process regression — large-scale GP under an asymmetric cost
- Bayesian neural networks & calibration — MC dropout, deep ensembles, SGLD, and Bayes-by-backprop, with reliability diagrams and OOD detection
- Safe / constrained Bayesian optimisation
- Reinforcement learning — policy-gradient agent on LunarLander
- SWA-Gaussian (SWAG) — diagonal and full covariance approximate posteriors
.
├── src/probabilistic_ai/ # Python package
│ ├── task0_bayesian_inference/
│ ├── task1_gp_regression/
│ ├── task2_bnn_uncertainty/
│ ├── task3_constrained_bo/
│ ├── task4_rl/
│ └── task5_swag/
├── tests/ # automated tests
├── data/ # dataset placeholders + docs
├── docs/ # high-level technical docs
├── .github/ # CI, templates, ownership metadata
├── pyproject.toml # Poetry project config
└── Makefile # common dev commands
Each task module includes a local README.md describing the problem,
methodology, and execution details.
- Python 3.10–3.12
- Poetry
- macOS system deps (for Box2D):
brew install swig
poetry install
poetry run pre-commit installmake check # lint + format-check + tests
make format # auto-format source and tests
make test # run pytestDatasets are intentionally excluded from version control.
See data/README.md for required files and paths.
GitHub Actions runs Ruff lint, Ruff formatting check, and Pytest on every push
and pull request. See .github/workflows/ci.yml.
MIT. See LICENSE.