Bayes on the Brain in Python

Title

Bayes on the Brain in Python

Leaders

Kelly Garner mastodon: garner_theory@fediscience.org github: kel-github mattermost: @kels

Gang Chen twitter: @gangchen6 github: afni-gangc mattermost: @gangchen

Collaborators

Christopher Nolan mastodon: @cnolan@fediscience.org github: crnolan

Brainhack Global 2022 Event

Brainhack Australasia

Project Description

Human brain imaging data is massively multidimensional, yet current approaches to modeling functional brain responses apply univariate tests to each voxel separately. This leads to controlling for a vast number of statistical inferences, and to an implicit but unrealistic assumption of a uniform distribution over voxels – no information is shared across the brain.

A more reasoned approach to assessing regional activity focuses on estimating the strength of an effect; this can be achieved readily under a Bayesian multilevel modeling framework. A further advantage to this approach is that you can build in better assumptions about the data (e.g. normality across space, see Chen et al, 2019, Neuroinformatics and eradicate the need for adjusting for masses of simultaneous statistical inferences.

Applying such a Bayesian multilevel modeling framework to the analysis of fMRI data is in its infancy. The methodology has been implemented at the region level into the AFNI programme (see Chen et al, 2022, Aperture Neuro, using Stan through the R package BRMS (Burkner et al, 2017, Journal of Statistical Software). At OHBM Brainhack 2022, we also implemented this methodology in Python using the PyMC framework (Salvatier et al, 2016, PeerJ Computer Science) and the Bambi interface (Capretto et al, 2022, Journal of Statistical Software).

At Brainhack Global 2022, we will be expanding the capability of the Python implementation. We will:

Our long term goal is to build a python interface and this is the first step!

To get started, take a look at Chen (2022, see above) for more details on the method. Also check out our implementation in Python

Repo:
https://github.com/crnolan/pyrba

Resources
https://bambinos.github.io/bambi/main/index.html
https://www.pymc.io/projects/docs/en/stable/learn.html
https://nilab-uva.github.io/AOMIC.github.io/
{Chen et al, 2022, Aperture Neuro](http://dx.doi.org/10.52294/2e179dbf-5e37-4338-a639-9ceb92b055ea)

Goals for Brainhack Global

Good first issues

  1. Have a go at using the current Python implementation in a Jupyter notebook
  2. Add a sample of the open dataset to the cloud server.
  3. Run through the PyMC, Bambi and brms tutorials to find any key differences (e.g. with regard to priors etc)
  4. Define a model to be run at the voxel level. Calculate compute time.

Communication channels

mattermost channel: bayes-on-the-brain

Skills

Onboarding documentation

See the link to the project repository and resources.

What will participants learn?

Data to use

https://nilab-uva.github.io/AOMIC.github.io/

Number of collaborators

more

Credit to collaborators

Project contributors will be listed on the project README and included as authors on any further outputs.

Image

Leave this text if you don’t have an image yet. project-image

Type

coding_methods, method_development, pipeline_development

Development status

1_basic structure

Topic

bayesian_approaches, MR_methodologies, reproducible_scientific_methods, statistical_modelling

Tools

AFNI, BIDS, fMRIPrep, Jupyter, other

Programming language

documentation, Python, R

Modalities

fMRI

Git skills

0_no_git_skills, 1_commit_push, 2_branches_PRs, 3_continuous_integration

Anything else?

No response

Things to do after the project is submitted and ready to review.


Date
Jan 1, 0001 12:00 AM