A Python implementation of Scholz, Calbert & Smith (2011), an attempt to replicate Bruce Bueno de Mesquita's expected utility model for political forecasting.
Original: https://github.com/jmckib/bdm-scholz-expected-utility-model
Changes by David Masad:
- Update to Python 3
- Make terminal output optional
- Enable logging to file
- bdm_scholz_model.py: The model code itself.
- ExampleActors.csv: Actors from the Scholz et al. paper
- Sultan.csv: Actors from the 'Sultan' dataset (1997?)
- Example.log: Model output generated by running the model with the ExampleActors.csv actors.
- Example Analysis.ipynb: Jupyter Notebook demonstrating running the model interactively, and showing a sensitivity analysis.
usage: python bdm_scholz_model.py [-h] [--verbose] [--log LOG] csv_path num_rounds
positional arguments:
csv_path: Path to csv with input data
num_rounds: Number of rounds of simulation to run
optional arguments:
-h, --help: show this help message and exit
--verbose: Output the model dynamics to the terminal.
--log: Path to log the model run to.
example:
python bdm_scholz_model.py ExampleActors.csv 10 --verbose --log Example.log