This is the material for my talk at the CEDAS-NORBIS Summer School 2023 in Bergen, Norway. It contains my slides, the Julia Turing.jl code that I showed in my talk, and some links to resources.
Here are the slides from my talk.
Some good Bayesian textbooks (there are many more!):
- Gelman et al (2013). Bayesian Data Analysis
- Bishop (2006). Pattern Recognition and Machine Learning
- McElreath (2022). Statistical Rethinking
- Bernardo and Smith (1994). Bayesian Theory
- Bayesian Learning - a gentle introduction. Book in progress.
- Bayesian Learning course - slides, computer labs and exams.
- Advanced Bayesian Learning course - slides and computer labs.
- Bayesian Learning - Observable Javascript widgets.
Here are some Turing.jl tutorials.
The file JuliaCode.zip contains the following files:
- iidnormalturing.jl for the iid normal model with both parameters unknown.
- poissonregturing.jl for the Poisson regression model, including HMC and Variational Inference for that model. Also the negative binomial regression extension is in that code.
Here is what you need to do in order to run the code:
- Download Julia and install it. I used version 1.9.2.
- Download my JuliaCode.zip with the code and extract it to a folder and open a terminal in that folder.
- Start Julia by typing
julia
in the terminal. - In Julia, type
]
and ENTER to enter the package manager. The prompt should change to something withpkg>
. - activate the environment by typing
activate .
and ENTER. (that's activate followed by space and a dot). - Instantiate the environment with all dependencies by typing
instantiate
and ENTER. - Press BACKSPACE to exit the package manager.
- Type for example
include("iidnormalturing.jl")
and ENTER to run the code. After the sampling, a plot should appear.
If you get serious with Julia and want to use it for your own work, I recommend that you use an IDE such as VS Code with the Julia extension.