Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Model-based aversive learning in humans is supported by preferential task state reactivation

Toby Wise, Yunzhe Liu, Fatima Chowdhury & Raymond J. Dolan

This repository contains code used for the analyses in the above paper.

Notebooks

The notebooks/templates directory contains template parameterised Jupyter notebooks that are run using Papermill. These are used for some of the primary analyses.

Code

The /code directory contains general analysis code, plus scripts that can be used to run the template notebooks. To run the primary analyses, these should be run as follows:

  1. /code/run_preproc_temp_gen.py - this runs preprocessing and temporal generalisation analyses.
  2. /code/run_sequenceness.py - this runs the classifier training for the sequenceness analysis, and then the analysis itself.

Some of these analyses rely on extensions of the decoding methods imolemented in MNE, which are included in /code/sliding_window_classifiers.py. These extend MNE's classifiers to be used with sliding windows.

For inference with the sequenceness data, the script code/run_lgpr.py is used to fit latent gaussian process regression (LGPR) models. The LGPR code itself is contained within /code/gp_functions.py.

Settings

Various settings for the analysis pipeline are included as JSON files in /settings/.

Dependencies

This code relies heavily on MNE. However, some scripts require different versions (new versions became available during analysis, but these broke some earlier scripts). Most scripts will run with v0.21.0, but some require v0.20.6 and will raise an error if this is not installed. In addition, the version of 0.20.6 must be this fork as it includes additional beamforming capabilities.

About

Code for the paper "Model-based aversive learning in humans is supported by preferential task state reactivation"

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages