Skip to content

Code for the manuscript "Time and memory costs jointly determine a speed-accuracy trade-off and set-size effects"

Notifications You must be signed in to change notification settings

LSZ2001/policycompression_timememorycosts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

policycompression_timememorycosts

Code for the manuscript "Time and memory costs jointly determine a speed-accuracy trade-off and set-size effects" (2024). The authors are Shuze Liu, Lucy Lai, Samuel J. Gershman, and Bilal A. Bari.

https://osf.io/preprints/psyarxiv/fupvy

  • Bold words are .m filenames.
  • Italicized words are .mat filenames or directory folder names.

All code assumes that the current directory of Matlab is the main folder. Hence, do the following before running any code:

# The variable main_folder contains the path to the main folder on your computer
cd(main_folder)
addpath(genpath(main_folder))

The code runs on Matlab version R2023a.

Online experiments

Main folder

  • plot_manuscript_figures.m creates all figures for the manuscript, based on the datafiles and the saved LBA model fits.

data subfolder

  • iti_bandit_data_exp1.mat to iti_bandit_data_exp3_old2.mat are the raw datafiles for each experiment. We excluded all participants who, in any test block, had an average RT over 5 seconds. These datafiles are used by plot_manuscript_figures.m above.
  • Other .mat files with the suffix train_blocks contain only training block performance. They include both included and excluded participants.
  • Other .mat files with the suffix test_blocks contain only test block performance.
  • Among the above, .mat files with the suffix _noexclusion do not apply the exclusion criterion. Hence they include both included and excluded participants.

figures subfolder

  • It contains all figures generated by plot_manuscript_figures.m above.

utils subfolder

  • It contains helper functions for the Blahut-Arimoto algorithm, mutual information and conditional entropy estimation, within-participant errorbar visualization, and color palettes.

lba_models subfolder

  • lba_fits_exp1.m and lba_fits_exp3.m perform LBA fits for Experiment 1 and 3. They parse datafiles into LBA-compatible format and fit parameters.

data subsubfolder

  • It contains parsed datafiles for Experiment 1 and 3 for subsequent LBA fits.

fits subsubfolder

  • It contains LBA fitted parameters for each experiment. They are used by plot_manuscript_figures.m above.

utils subsubfolder

About

Code for the manuscript "Time and memory costs jointly determine a speed-accuracy trade-off and set-size effects"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages