Skip to content

Commit 478c6b0

Browse files
committed
Merge reviewer-responses: address peer-review comments
Address all 18 peer-review comments (2 reviewers) across the website and both manuscript variants: PSIS-LOO-CV switch, learning objectives, prior figures, rank plots, DOI pass, single-MIT relicense, author affiliations. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> # Conflicts: # paper.pdf # workshops/01.R_basics/qmd/probability.qmd
2 parents 1b1e057 + d1bdcb5 commit 478c6b0

45 files changed

Lines changed: 757 additions & 1374 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@ figure.pptx
2525

2626
# macOS system files
2727
**/.DS_Store
28-
.DS_Store
28+
.DS_Store
29+
.tokensave

CONTRIBUTING.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Contributing
2+
3+
We welcome contributions regarding content or with fixing errors on the current website. Making and committing these changes is simple.
4+
5+
Assuming you have cloned the repository and have [Quarto](https://quarto.org/) installed, you can preview any changes that you have in the browser by running:
6+
7+
`quarto preview`
8+
9+
If you are fortunate enough to have admin access (i.e., are a member of the ALPN Lab), you can just commit the changes:
10+
11+
```bash
12+
git add .
13+
git commit -m "your commit message"
14+
git push origin main
15+
```
16+
17+
And once the changes have been pushed, re-build the website by running:
18+
19+
`quarto publish gh-pages`
20+
21+
If you do not have admin privileges, you can commit the changes to the `main` branch by following the steps below:
22+
23+
```bash
24+
# First, make sure you fork https://github.com/Alpn-Lab/BayesCog to your GitHub account
25+
26+
# Add the original as upstream
27+
git remote add upstream https://github.com/Alpn-Lab/BayesCog.git
28+
29+
# Create and switch to a new branch for your changes
30+
git checkout -b your-feature-name
31+
32+
# Add and commit your changes
33+
git add .
34+
git commit -m "Describe your changes here"
35+
36+
# Push to your fork
37+
git push origin your-feature-name
38+
```
39+
You will then need to go to your fork on GitHub, where you'll see a prompt to "Compare & pull request" for your new branch. Click that to create a pull request to suggest your changes to the `main` repository.
40+
41+
If approved, we will both add the changes and you to the 'Contributors' list!

LICENSE

Lines changed: 21 additions & 427 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 18 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# BayesCog - Bayesian statistics and hierarchical Bayesian modeling for psychological science
22

33
![Visitors](https://hitscounter.dev/api/hit?url=https%3A%2F%2Falpn-lab.github.io%2FBayesCog%2F&label=Visitors&icon=github&color=%23e35d6a&message=&style=flat&tz=Europe%2FLondon)
4-
[![GitHub contributors](https://img.shields.io/github/contributors/alpn-lab/BayesCog.svg)](https://github.com/alpn-lab/BayesCog/graphs/contributors)
4+
[![GitHub contributors](https://img.shields.io/github/contributors/alpn-lab/BayesCog.svg)](https://github.com/alpn-lab/BayesCog/graphs/contributors)
55
[![GitHub last commit](https://img.shields.io/github/last-commit/alpn-lab/BayesCog?color=orange&logo=github)](https://github.com/alpn-lab/BayesCog)
66
[![GitHub repo size](https://img.shields.io/github/repo-size/alpn-lab/BayesCog?color=brightgreen&logo=github)](https://github.com/alpn-lab/BayesCog)
77
<br/>
@@ -11,12 +11,12 @@
1111
</p>
1212

1313
This website[^1] is an adapted version of teaching materials originally made for the <ins>award winning</ins>\* **BayesCog** seminar at the [Faculty of Psychology](https://psychologie.univie.ac.at/), [University of Vienna](https://www.univie.ac.at/en/), as part of the Advanced Seminar for master's students (Mind and Brain track; recorded during Summer Term 2020/2021).
14-
Further content from the [BayesCog workshop at UKE Hamburg](https://github.com/lei-zhang/BayesCog_Part1) (2023) have also been added.
14+
Further content from the [BayesCog workshop at UKE Hamburg](https://github.com/lei-zhang/BayesCog_Part1) (2023) have also been added.
1515

1616
**Recording**: Recordings from the original version of the course are available on [YouTube](https://www.youtube.com/watch?v=8RpLF7ufZs4&list=PLfRTb2z8k2x9gNBypgMIj3oNLF8lqM44-).
1717
The most recent recording from the 2021 summer semester is also available on [YouTube](https://youtube.com/playlist?list=PLfRTb2z8k2x8ZCqDJ0WEFNs2ymXQCliLa).
1818

19-
**Outreach**: [**Twitter thread**](https://twitter.com/lei_zhang_lz/status/1276506555660275714?s=20) (being **liked 700+ times** on Twitter) summarizing the contents of the course.
19+
**Outreach**: [**Twitter thread**](https://twitter.com/lei_zhang_lz/status/1276506555660275714?s=20) (being **liked 700+ times** on Twitter) summarizing the contents of the course.
2020

2121
**Award/Recognition**: The original course received a commendation award from the [Society for the Improvement of Psychological Science (SIPS)](https://improvingpsych.org/mission/awards/) (also see a [tweet](https://twitter.com/improvingpsych/status/1323269273033281538?s=20)), as well as an ECR Teaching Award from the [Faculty of Psychology, University of Vienna](https://ecr-psychology.univie.ac.at/news/).
2222

@@ -33,9 +33,9 @@ The most recent recording from the 2021 summer semester is also available on [Yo
3333

3434
## Course summary
3535

36-
Computational modeling and mathematical modeling provide an insightful quantitative framework that allows researchers to inspect latent processes and to understand hidden mechanisms. Hence, computational modeling has gained increasing attention in many areas of cognitive science through **cognitive modeling**. One illustration of this trend is the growing popularity of Bayesian approaches to cognitive modeling. To this end, this course teaches the theoretical and practical knowledge necessary to perform, evaluate and interpret Bayesian modeling analyses, with a specific emphasis towards modeling latent cognitive processes.
36+
Computational modeling and mathematical modeling provide an insightful quantitative framework that allows researchers to inspect latent processes and to understand hidden mechanisms. Hence, computational modeling has gained increasing attention in many areas of cognitive science through **cognitive modeling**. One illustration of this trend is the growing popularity of Bayesian approaches to cognitive modeling. To this end, this course teaches the theoretical and practical knowledge necessary to perform, evaluate and interpret Bayesian modeling analyses, with a specific emphasis towards modeling latent cognitive processes.
3737

38-
In the course, students will be formally grounded in key principles of cognitive modeling including Bayesian statistics, statistical distibrutions and reinforcement learning.
38+
In the course, students will be formally grounded in key principles of cognitive modeling including Bayesian statistics, statistical distributions and reinforcement learning.
3939
We will use [R/RStudio](https://posit.co/download/rstudio-desktop/) and a newly developed statistical computing language - [Stan](https://mc-stan.org) - to perform Bayesian analyses, ranging from simple binomial models and linear regression models to more complex hierarchical reinforcement learning (RL) models.
4040

4141
## List of folders and contents
@@ -51,12 +51,10 @@ Folder | Task | Model
5151
07.optm_rl | 2-armed bandit task | Simple reinforcement learning (RL)
5252
08.compare_models | Probabilistic reversal learning task | Simple and Fictitious RL models
5353
09.debugging | Memory Retention | Exponential decay model
54-
10.model_based | WIP | WIP
55-
11.delay_discounting | WIP | WIP
5654

5755
## Set-up
5856

59-
There is no additional set-up needed if you aim to work solely from the website. However, to work on the exercises yourself, several software and packages are required.
57+
There is no additional set-up needed if you aim to work solely from the website. However, to work on the exercises yourself, several software and packages are required.
6058

6159
### Locally using RStudio and `renv`
6260

@@ -73,15 +71,15 @@ git clone https://github.com/alpn-lab/BayesCog.git
7371
cd BayesCog
7472
```
7573

76-
The various analyses across the workshops require specific packages to be installed. This project uses `renv` to manage package dependencies.
74+
The various analyses across the workshops require specific packages to be installed. This project uses `renv` to manage package dependencies.
7775

7876
To set up the environment, firstly open `RStudio` in the project root and run in the console:
7977

8078
```r
8179
source("setup.R")
8280
```
8381

84-
After executing this command once, the project environment will **load automatically whenever you open the project,** for both project root and individual workshops.
82+
After executing this command once, the project environment will **load automatically whenever you open the project,** for both project root and individual workshops.
8583
All you need to do is to load the packages required for the relevant scripts when necessary e.g., `library(rstan)`.
8684

8785
> You can always check if you are missing a certain package by clicking on the 'Packages' tab (next to 'Files/Plots' tab) or by running `library()`.
@@ -104,7 +102,7 @@ docker run -d -p 8787:8787 \
104102

105103
> Make sure to replace the PASSWORD argument with your own password!
106104
107-
This will mount the Docker image onto the BayesCog repository.
105+
This will mount the Docker image onto the BayesCog repository.
108106

109107
Then, navigate to [http://localhost:8787](http://localhost:8787/) in a browser, and type your username (which is always 'rstudio') and the password chosen in the command prior.
110108

@@ -131,47 +129,15 @@ docker images
131129
docker rmi your_docker_image # e.g. docker rmi sohamir/bayescog
132130
```
133131

134-
## Contributing
132+
## Getting help
135133

136-
We welcome contributions regarding content or with fixing errors on the current website. Making and committing these changes is simple.
134+
If you run into problems while working through the course, there are a few places to look:
137135

138-
Assuming you have cloned the repository and have [Quarto](https://quarto.org/) installed, you can preview any changes that you have in the browser by running:
136+
- **Setup and installation issues** (e.g. installing RStan, restoring the `renv` environment, or building the Docker image): re-check the [Set-up](#set-up) instructions above. If a local installation proves difficult, the [Docker image](#building-the-docker-image) provides a pre-configured RStudio environment with all required packages and is the most reliable fallback.
137+
- **Questions about the course content or models:** each workshop page on the [website](https://alpn-lab.github.io/BayesCog) is self-contained and includes worked examples and solutions.
138+
- **Bugs, errors, or suggestions:** please [open an issue](https://github.com/Alpn-Lab/BayesCog/issues) on the GitHub repository, or get in touch using the [Contact](#contact) details below.
139139

140-
`quarto preview`
141-
142-
If you are fortunate enough to have admin access (i.e., are a member of the ALPN Lab), you can just commit the changes:
143-
144-
```bash
145-
git add .
146-
git commit -m "your commit message"
147-
git push origin main
148-
```
149-
150-
And once the changes have been pushed, re-build the website by running:
151-
152-
`quarto publish gh-pages`
153-
154-
If you do not have admin privileges, you can commit the changes to the `main` branch by following the steps below:
155-
156-
```bash
157-
# First, make sure you fork https://github.com/Alpn-Lab/BayesCog to your GitHub account
158-
159-
# Add the original as upstream
160-
git remote add upstream https://github.com/Alpn-Lab/BayesCog.git
161-
162-
# Create and switch to a new branch for your changes
163-
git checkout -b your-feature-name
164-
165-
# Add and commit your changes
166-
git add .
167-
git commit -m "Describe your changes here"
168-
169-
# Push to your fork
170-
git push origin your-feature-name
171-
```
172-
You will then need to go to your fork on GitHub, where you'll see a prompt to "Compare & pull request" for your new branch. Click that to create a pull request to suggest your changes to the `main` repository.
173-
174-
If approved, we will both add the changes and you to the 'Contributors' list below!
140+
If you would like to contribute a fix or improvement yourself, see the [`CONTRIBUTING`](CONTRIBUTING.md) guidelines.
175141

176142
## Contributors
177143

@@ -197,12 +163,9 @@ This project follows the [all-contributors](https://allcontributors.org) specifi
197163

198164
## License
199165

200-
This course is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/deed.en).
201-
202-
You are free to share, copy, and redistribute the material in any medium or format. Additionally, you can adapt, remix, transform, and build upon the material for any purpose, including commercial use.
203-
However, you must provide appropriate attribution, including credit to the original source, a link to the license, and an indication if changes were made. Furthermore, if you remix, transform, or build upon the material, you are required to distribute your contributions under the same license as the original.
166+
This project — including both the course content (the website text, figures, slides, and teaching materials) and the code (the R scripts, Stan models, and other software in this repository) — is released under the [MIT License](https://opensource.org/licenses/MIT) (see [`LICENSE`](LICENSE)).
204167

205-
<img src="images/introduction/cc_by_sa.png" width="13%">
168+
You are free to use, copy, modify, and redistribute the material for any purpose, including commercial use, provided that the copyright notice and permission notice are retained.
206169

207170
## Citing
208171

@@ -228,4 +191,4 @@ For BibTeX users:
228191

229192
For bug reports, issues or comments, please contact [Lei Zhang](mailto:lei.zhang.13@bham.ac.uk) or [Aamir Sohail](mailto:axs2210@bham.ac.uk), or open a thread on the GitHub repository.
230193

231-
[^1]: Bayes' photo credit: Burrsettles (2016). The three faces of Bayes. Slackprop.
194+
[^1]: Bayes' photo credit: Burrsettles (2016). The three faces of Bayes. Slackprop.

_quarto.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ website:
1111

1212
page-footer:
1313
right: "This page is built with 🧠, ☕ and [Quarto](https://quarto.org/)."
14-
left: "&copy; Zhang & Sohail, 2025"
14+
left: "&copy; Zhang & Sohail, 2026"
1515

1616
sidebar:
1717
logo: "images/alpn_logo_with_text.png"

course_overview.qmd

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,11 @@ Folder | Task | Model
9191
`02.binomial_globe` | Globe toss | Binomial model
9292
`03.bernoulli_coin` | Coin flip | Bernoulli model
9393
`04.regression_height` | Observed weight and height | Linear regression model
94-
`05.regression_height_poly`* | Observed weight and height | Polynomial regression model
94+
`05.regression_height_poly` | Observed weight and height | Polynomial regression model
9595
`06.reinforcement_learning` | 2-armed bandit task | Simple reinforcement learning (RL)
9696
`07.optm_rl` | 2-armed bandit task | Simple reinforcement learning (RL)
9797
`08.compare_models` | Probabilistic reversal learning task | Simple and Fictitious RL models
9898
`09.debugging` | Memory Retention | Exponential decay model
99-
`10.model_based`* | WIP | WIP
100-
`11.delay_discounting`* | WIP | WIP
101-
102-
*Workshops 5, 10 and 11 have yet to be added, so watch this space!
10399

104100
In addition to following along with the taught material, **there are a number of exercises that you can work through.** The code and solutions to the exercises will be worked through on the website in some cases, but not in others. In all cases however, the materials to work through the exercises yourself are provided.
105101

157 KB
Loading
97.6 KB
Loading
-933 KB
Binary file not shown.

index.qmd

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,9 @@ Both L.Z. and A.S. further revised and edited the website.
7575

7676
## License
7777

78-
This course is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/deed.en).
78+
This course — including both the teaching content and the accompanying code (the R scripts and Stan models) — is licensed under the [MIT License](https://opensource.org/licenses/MIT).
7979

80-
You are free to share, copy, and redistribute the material in any medium or format. Additionally, you can adapt, remix, transform, and build upon the material for any purpose, including commercial use.
81-
However, you must provide appropriate attribution, including credit to the original source, a link to the license, and an indication if changes were made. Furthermore, if you remix, transform, or build upon the material, you are required to distribute your contributions under the same license as the original.
82-
83-
![](images/introduction/cc_by_sa.png){width="13%"}
80+
You are free to use, copy, modify, and redistribute the material for any purpose, including commercial use, provided that the copyright notice and permission notice are retained.
8481

8582

8683
## Citing

0 commit comments

Comments
 (0)