This repository hosts the code behind the PLoS Computational Biology paper which investigates the mechanism behind changes-of-mind in perceptual decisions in situations where no additional evidence is available after the initial decision.
The data collection code requires 32-bit versions of Python 2.7, PsychoPy 1.84.1, PyGaze, pyglet 1.2.4 (available from PyPI: pip install pyglet==1.2.4
).
The main results of this work are presented in the notebook reproducing all figures from the paper. The notebook needs to be pointed to the data, which can be downloaded from OSF. You can either download the processed data, or download the raw data and run the preprocessing scripts on it (0_fix_session_no.py
, 1_csv_merge.py
, 2_save_processed_data.py
).
To run the analysis code, you'd need Python 3.5+; the most convenient way of getting it is to install the latest version of Anaconda, which also includes all the dependencies:
- Jupyter Notebook 1.0.0+
- NumPy 1.12.1+
- SciPy 0.19.1+
- pandas 0.20.1+
- matplotlib 2.0.2+
- seaborn 0.7.1+
Statistical analysis notebook reproduces the tables from the paper. To run it, you need R and IRKernel.
You need Matlab 2017+ in order to run the model simulations.
The eDDM simulation results are generated in Matlab, and visualized in this notebook.
If you're not familiar with Jupyter Notebooks, here is a good starting guide