load_two_step_data#
- load_two_step_data()[source]#
Load the adult two-step task dataset of Smid et al. (2022).
- Returns:
pd.DataFrameA pandas DataFrame with one row per trial and participant.
See also
cpm.applications.reinforcement_learning.HybridMBMFhybrid model-based / model-free reinforcement learning model of the two-step task.
Notes
The data are from the adult group of Smid et al. (2022), who completed 140 trials of the deterministic two-step task of Kool et al. (2016). The task uses the original coding, so the columns need converting before they can be passed to
HybridMBMF(see the two-step task example in the documentation).The data were originally published by the authors in the Model-based_Model-free_Developmental repository on GitHub.
The dataset includes the following columns:
ppt: the participant number.trial: the trial number.block: the block number.stake: the stake of the trial (1 or 5).s1,s2: the starting state and the planet reached (1 or 2; 0 marks a missed trial).choice: the chosen spaceship, numbered 1 to 4 across both starting states (-1 marks a missed trial).stimuli_left,stimuli_right: which spaceships were displayed on the left and right.points: the reward, scaled between 0 and 1.rews_1,rews_2: the rewards both planets would have paid out, scaled between 0 and 1.rt_1,rt_2: the response times at the first and second stage, in seconds.timeout_1,timeout_2: whether the participant failed to respond in time at either stage.missed: whether the trial was missed.score: the running score.
References
Kool, W., Cushman, F. A., & Gershman, S. J. (2016). When does model-based control pay off? PLoS Computational Biology, 12(8), e1005090.
Smid et al. (2022). Computational and behavioral correlates of developmental changes in model-based/model-free decision-making. Developmental Science, e13380.
Examples
>>> data = load_two_step_data() >>> print(data.head())