Project for CS523 for recreating the results of Evolutionary Transitions and Top-Down Causation.
The File part1.py outputs vendiagrams and timeseries plots with only slight differances from the ones used in the paper. Text files are creaed which are then manualy plluged into JIDT for calculating the transfer entropy.
The file logistic_map.py was used for generating results in both part 2 and part 3. In the last line of the program if pic = True then it generates the return map figure for 1000 populations and 10000 generations, with global coupling strengths following the values used in the Walker paper. The directory 'logistic_map_figures' contains 10 figures generated with the best-fit figure shown in our paper.
The file logistic_map.py with the last line setting pic = False generates data for 10 metapopulations, each with 3 subpopulations sampled from 1000 subpopulations with 1000 generations. The global coupling strengths are from values 0 to 1 incremented by 0.025. After this population data was generated, the MatLab file TEcalc.m was used to calculate the transfer entropy in both directions and stores it as 'TD_data.csv' and 'BU_data.csv'. The MatLab file plotCI.m reads in these files, calculates the average and 95% confidence intervals, and creates the final plot used in our project. The MatLab file MIcalc.m reads in the population data and computes the mutual information between sub-populations and produces the plot used in the project.
The file part4.py generates all of the plots used in the paper. For further information see comments in the file.
The docker builds are designed to be run using the run.ps1 Powershell script, or run.sh bash script, as appropriate for the host platform.
Both containers require a host volume mounted as /app/output and containing a TEData in order to produce the output files.
The MATLAB container additionally must be run in interactive mode to enable mathworks account verification.
If you wish to build the two containers and manually execute them, the following docker commands will do that, assuming all prerequisites are met:
docker build -f dockerfiles/python.Dockerfile -t cs523-demo-python .
docker build -f dockerfiles/matlab.Dockerfile -t cs523-demo-matlab .
docker run -v <path you wish to store output files in>:/app/output cs523-demo-python
docker run -it -v <path you wish to store output files in>:/app/output cs523-demo-matlabHowever, it is almost universally easier to use the pre-configured run files, as these also contain the required download commands to retrieve the correct jidt distribution and build it into the MATLAB container in the correct location.
The docker configurations for this application can be found in dockerfiles/python.Dockerfile and dockerfiles/matlab.Dockerfile
and are designed to run the full configuration autonomously, requiring only input modification.
The configurations can be found in the main functions of part1.py, logistic_map.py and part4.py located in the src directory.
The full runtime process takes approximately 1 hour on a fast system. reducing generations or other computationally intensive artifacts may improve runtime at the cost of data resolution. Run the configuration as is at your own risk.