# Bayesian Learning Group Summer 2024
## August 9, 2024 - Interaction models
### Attendance
*
### Agenda
* [Notes for today](https://cct-datascience.github.io/bayesian-learning-group/interaction)
* [End-of-semester survey](https://forms.gle/vgbLpsCuim9aXBPc6)
### Further reading
* [Notes on the differences between different types of posterior prediction](https://www.andrewheiss.com/blog/2022/09/26/guide-visualizing-types-posteriors/#tldr-diagrams-and-cheat-sheets)
### Upcoming offerings from CCT Data Science
* [Drop-in hours Tuesdays from 9-10 online](https://datascience.cct.arizona.edu/drop-in-hours)
* [Fall workshop series on Reproducibility and Data Science in R](https://datascience.cct.arizona.edu/events/fall-2024-workshop-series-reproducibility-and-data-science-r)
* [Incubator program](https://datascience.cct.arizona.edu/incubator)
## July 19, 2024 - ~~Interaction models~~ Categorical predictors and model comparison
### Attendance
Harsha V
### Agenda
* [Notes for today](https://cct-datascience.github.io/bayesian-learning-group/categorical)
## July 5, 2024 - Posterior distributions
### Attendance
Walter Betancourt
Harsha V
N. Brandon Barba
### Agenda
- Building on last week: Posterior predictive checks
- [Notes for today](https://cct-datascience.github.io/bayesian-learning-group/posterior)
## June 21, 2024 - Linear model
### Attendance
- Alex Strong
- Irina Stefan
- Salena Ashton
- Walter
### Agenda
- Did you have a chance to read or watch the lectures?
- Put an x here for yes: X
- Put an x here for no:
- [Link to document of notes to work through](https://cct-datascience.github.io/bayesian-learning-group/components.html)
## June 7, 2024 - Fundamentals
### Attendance
-Alex Strong
-Walter Betancourt
-Harsha Vishwanath
-Joshua Oyekanmi
-N. Brandon Barba
*Put your name here - optional, but it helps us keep track!*
### Agenda
- Check in on software installs
- Did you have a chance to read or watch the lectures?
- Put an x here for yes:xxx
- Put an x here for no:xx
- What questions did you have after going through the materials?
- Core idea from these chapters:
- Use of DAGs to organize a modeling workflow
- ![image](https://hackmd.io/_uploads/rkEbTkZBC.png)
- from https://www.youtube.com/watch?v=FdnMWdICdRs&list=PLDcUM9US4XdPz-KxHM4XHt7uUVGWWVSus&index=1
- Directed acyclic graph
- Define your mental model of how the variables in a system influence each other
- Use this to develop a logical generative model (and protect yourself against confounds, etc)
- From the lectures:
- ![image](https://hackmd.io/_uploads/HJsPQReBA.png)
- from https://www.youtube.com/watch?v=R1vcdhPBlXA&list=PLDcUM9US4XdPz-KxHM4XHt7uUVGWWVSus&index=2&pp=iAQB
- Components of a Bayesian model
- https://learning.oreilly.com/library/view/statistical-rethinking-2nd/9780429639142/xhtml/06_Contents.xhtml#sec2_3
- Variables
- Unobsesrved variables are parameters that must be estimated
- Definitions
- How are the variables related?
- Assign distributions to the variables = *likelihood*
- Height ~ Age
- Height ~ N(mean_height, standard_deviation_height)
- mean_height ~ intercept + slope * age
- We want to estimate the intercept and the slope
- Prior
- Encodes any prior information about the parameters
- Posterior
- https://learning.oreilly.com/library/view/statistical-rethinking-2nd/9780429639142/xhtml/06_Contents.xhtml#sec2_4
- ![image](https://hackmd.io/_uploads/BJ4_ecgBC.png)
- Exercises from Ch. 2 - see code
- ![image](https://hackmd.io/_uploads/Bk6Vf5gHR.png)
## May 24, 2024 - Launch, + MCMC
### Attendance
*Put your name here - optional, but it helps us keep track!*
- Renata Diaz
- Matthew Cheffer
- Alex Strong
- Brandon Barba
- Salena Ashton
- Walter Betancourt
- Harsha Vishwanath
- Irina Stefan
### Agenda
- Introductions (5m)
- Please share: Name, pronouns (if you want), department, career stage, any past Bayesian experience, what you're hoping for from the group
- Group format (10m)
- **Flexible and adaptive** - we will make this what you ask for
- **Learning group**, not a course
- No lecturing
- Encouraged to read or watch materials between sessions
- In-session, we will work through problems from the book (*Statistical Rethinking* by Richard McElreath)
- **Model "show and tell"**
- Do you have a model you've worked up? Talk us through it!
- Sign ups above
- **Other ideas**
- Group modeling projects
- Resources (5m)
- Slack
- [HackMD](https://hackmd.io/On-ClLCuSUCqfu5mcS-GIA?edit)
- [Course website](https://cct-datascience.github.io/bayesian-learning-group)
- [Rethinking at the library](https://arizona-primo.hosted.exlibrisgroup.com/permalink/f/evot53/01UA_ALMA51805609970003843)
- [Rethinking video lectures](https://www.youtube.com/watch?v=FdnMWdICdRs&list=PLDcUM9US4XdPz-KxHM4XHt7uUVGWWVSus)
- Statistics!
- Orientation (20m)
- (McElreath's take on) Bayesian approaches
- Golems
- DAGs
- Limits of causal inference
- Components of a Bayesian model
- Modeling workflow
- DAG
- Write a model
- Decide on priors
- Translate to code
- Run model
- Investigate posterior
- MCMC (5m)
- Examples in the early chapters worked with quap (quadratic approximation)
- MCMC is an algorithm to sample the posterior more efficiently
- Discuss MCMC under the hood
- Revisiting an example from the spring with MCMC (15m)
- ![image](https://hackmd.io/_uploads/ryh9Bj-y0.png)
- https://github.com/diazrenata/blg-2024/blob/main/summer1/foxes.md
- Software install (on your own)
- https://github.com/rmcelreath/rethinking/
## Spring doc
[Link to Spring doc](https://hackmd.io/z9Or6dTqRuKKkNHDeDM1cw?view)