Source code for the Contextualized, Event-predictive, Resource-limited Processing model (CERP).
This repository contains the model implementation, simulation, analysis and plotting scripts.
The code requires Python 3 and the following packages:
- NumPy
- pandas
- SciPy
- Matplotlib
- Plotly
- Shiny for Python
- shinywidgets
Note: Shiny is not necessary unless you want to run the included Shiny app.
model_core.py— core CERP modelmodel_test_grid_search_cli.py— run the model using the command-line, with variable parametersmodel_test_grid_search.py— run the model directly in Python, with variable parametersmodel_test_acce_over_t_sim_grid_search.py— aCCE-over-time analysesplot_comparison.py— comparison with experimental resultsapp.py— interactive Shiny applicationplotting.py,further_plots.py,utilities.py— supporting functions
To view the command-line options:
python model_test_grid_search_cli.py --helpTo run the model directly in Python, you can execute:
python model_test_grid_search.pyTo run the interactive Shiny application, execute:
shiny run app.pySelected model data and results are provided in 'Exp-Data/' and 'Exp-Results-search/'.
plot_comparison.py uses data from Experiment 2 of:
Lohmann, J., Belardinelli, A., & Butz, M. V. (2019). Hands Ahead in Mind and Motion: Active Inference in Peripersonal Hand Space. Vision, 3(2), 15. https://doi.org/10.3390/vision3020015
The original experimental data and scripts are publicly available from the associated OSF repository: https://osf.io/ap7xt
Download the files (particularly, RawVerbalRT.dat) and place them in:
Data/experimental_Lohmannetal2019Exp2/
The experimental data are not redistributed in this repository.
To be added.