Renata Abikeyeva and Madhurima Chandra
This repository contains our final project for the course Effective Programming Practices for Economists taught by Professor Hans-Martin von Gaudecker. We implement tests for a subset of the optimizers supported by the Python package Estimagic. In creating this project, we use the very helpful template for reproducible research in Economics of Hans-Martin von Gaudecker.
Open a shell in the directory where you wish to save the project and run the following:
$ git clone https://github.com/RenataAbikeyeva/epp_project.git
$ conda env create -f environment.yml
$ conda activate epp_project
$ python waf.py configure
$ python waf.py build
$ python waf.py install
- Implement the criterion functions.
- Run optimizations for all possible combinations of criterion, constraint and algorithm with Estimagic. We parallelize the optimizations using Waf, which reduces total runtime of the build process to 17-20 minutes. (Without parallelization, it took 40 minutes on our machine)
- Run tests to compare each optimized result with its corresponding true value (calculated by hand).
- Visualize results with comparison plots. (Code generating interactive plots not written by us. Thanks to the Estimagic team!)
- Compile Documentation.
The src directory has the subdirectories:
- model_specs: JSON files of model specifications
- model_code: implementation of criterion functions
- analysis:
- run_optimizer_benchmarks.py
- concat_results.py
- test_run_optimizer_benchmarks.py
- true_df.csv
- precision_levels_df.csv
- comparison_plot
- final
- documentation
Waf build generates the directory bld in your project root directory. In bld, out/analysis contains the resulting dataframe of all optimized values (df_calculated.csv) and out/figures the interactive plots. The generated documentation can be found in bld/src.