load_bandit_data#
- load_bandit_data()[source]#
Load the 2-arm bandit dataset from a CSV file.
- Returns:
pd.DataFrameA pandas DataFrame containing the two-armed bandit data.
Notes
On each trial, two of four stimuli (arms) are shown on the left and right, and the participant chooses one of them. The dataset includes the following columns:
ppt: the participant number.trial: the trial number.arm_left: the stimulus (1 to 4) presented on the left side.arm_right: the stimulus (1 to 4) presented on the right side.reward_left: the reward received when the left stimulus is selected.reward_right: the reward received when the right stimulus is selected.response: the response of the participant (0 for left, 1 for right).feedback: the reward the participant received.
Examples
>>> data = load_bandit_data() >>> print(data.head())