Zenodo
Do higher-order moments improve inference of population dynamics?
By Chandan Relekar, Amanda de Azevedo-Lopes, Michael Sieber and 1 others.
Abstract
This repository contains the code and data required to replicate the work in the manuscript titled "Do higher-order moments improve inference of population dynamics?". This work uses Python 3.12. The required modules can be installed using the command: pip install -r requirements.txt Despite multiple attempts, we were unable to upload the entire data.zip file in one go. Therefore, please extract the 4 zip files named "fig2_fig3", "fig4_lg", "fig4_lv" and "fig_et" and place the 4 resulting folders in a new folder named "data" in the root of the directory, such that the file structure looks like this: Root | +-- .py files | +-- requirements.txt file | +-- data folder | +-- fig2_fig3 folder |. | |. +-- .pkl files | +-- fig4_lg folder |. | |. +-- .pkl files | +-- fig4_lv folder |. | |. +-- .pkl files | +-- fig_et folder | . +-- .pkl files A brief summary of what the scripts do: The scripts "figures_main.py" and "figures_appendix.py" can be used to plot the figures used in the manuscript, based on the inference files in subfolders of the "data" folder. "all_inferences_runner.py" can run all the inferences required to redo the simulated dataset. For parallel job runs on a cluster [recommended], the flag "sequential" should be set to false, and the cluster must have SLURM installed. The generated inference results will be deposited in an automatically created "outputs" folder. In order to plot figures based on a newly generated datasets, please create a new folder inside the "data" folder and place the .pkl files there. Thereafter, tweak the "folder" arg of the the functions in the figure scripts to that of the newly created folder. The scripts "LG_model.py" and "LV_model.py" contain the two models used in our work, and extend the Model object in "model.py". You can include your own models by inheriting the model object and defining all of the required functions. "abc_inference.py" contains the inference object. "random_abc_inference.py" generates randomized model parameters and their trajectories based on a given seed. "pdf_plotter.py" and "time_series_plotter.py" plots the posterior PDFs and the time-series generated from the most-likely parameter values, respectively.





