trepka_etal_natcomm_2021 contains the data, code, and output files necessary to generate the figures for the accompanying paper. To generate all figures, clone the repository and run trepka_etal_natcomm_2021.m.
Data from each superblock for monkeys and session for mice is formatted as a MATLAB structure named stats. The monkey data file is located at datasets/preprocessed/all_stats_costa and the mouse data file is located at datasets/preprocessed/all_stats_cohen.
The stats structure for both mice and monkeys has the following fields:
- r: an array of length
n_trials
.stats.r[i] == -1
if the mouse (monkey) choose left (circle) in triali
.stats.r[i] == 1
otherwise. - c: an array of length
n_trials
.stats.c[i] == 1
if the animal received a reward in triali
.stats.c[i] == 1
otherwise. - hr_side: an array of length
n_trials
.stats.hr_side[i] == -1
if the left (circle) has a higher reward probability than the alternative for the block containing triali
.stats.hr_side[i] == 1
otherwise. - reward_prob: an array of length
n_trials x 2
.stats.reward_prob[i,:] == [l,r]
wherel
is the reward probability associated with the left side (circle stimulus) andr
is the reward probability associated with the right side (square stimulus) for the block containing triali
- animal_ids: the identifier for the animal that the data for this session/superblock is from
- block_addresses: The
kth
block in the current superblock or session starts atstats.block_addresses[k]
- block_indices: similar to block addresses but with indices for each block instead of just start and end trials
- probXY:
probXY[k] == 1
if thekth
block in the current superblock or session has reward scheduleXY
.probXY[k] == 0
otherwise.
├───datasets - contains data from mice and monkey experiments
├───figures - folders for figure output
├───fit functions - functions for model fitting
│ ├───helpers - fitting and simulation functions
│ ├───models - model functions
├───helper functions - functions written for this project and from MATLAB file exchange
├───metric functions - functions to calculate entropy- and behavioral- metrics
├───output - saved intermediate output that can be used to recreate paper figures
├───plot functions - functions for plotting each figure in the paper
Checkout the DartmouthCCNL/EntropyMetrics repository for a demo notebook that explains how to calculate and use the entropy metric functions.