Skip to content

Latest commit

 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FAST-cm

FAST Models for VIEWS cm data

Patrick T. Brandt

Professor of Political Science

University of Texas, Dallas

This repo develops the training-test-dev for the cm models. It shows

  1. The train-dev-test splits and analysis results
  2. The final models chosen and their interpretations
  3. How the forecast results can be summarized by country, quantiles, and time periods.

Notes:

  • One needs to execute the files in this repo to be able to fully generate the forecasts in the last step.
  • Overall, the interim steps generate over 2GB of simulated forecasts and data subsets of for the training and evaluation steps.
  • Resources: a multicore R setup helps here, and you will need over 16GB of free memory in some of the early scripts when using all of the training data.

Basic starting setup

  1. Run the VIEWS-startup repo to get the dataset as documented used here. This gets you all the data downloaded and setup for analysis.
  2. Run the setup.R script.

This will give you the datasets in cm_subsets.RData. This is then the main input to what follows since it defines dataframes for the Globe and Africa and the Middle East over the time periods.

Training and Validation Steps

Execute the batch.sh script to run the additional data prep, training, dev and validation models. This is all inputs for the final model selection and presentation.

These are the R scripts (which need to be run in order -- see batch.sh):

  • modelselect.R
  • modelselect-globe.R
  • modelselect-valid.R
  • modelselect-globe-valid.R
  • modelselect-glmm-covar.R
  • scoring-cm.R
  • scoring-cm-valid.R

These create all of the training and validation datasets for the model selection.

Selecting and Fitting the Forecast Production Model

The forecast model is then summarized in the FAST-cm.Rmd which selects and fits the final production model.

  1. Model comparison and selection is summarized in FAST-cm.* related files, which are here in all the favorite flavors (Rmd for code, and outputs in html / md).
  2. Earlier (draft) results, forecast summaries, and explanations of the process are here a. Spreadsheets summaries by country and month are in the repo as *.xlsx files b. Forecast samples are in a dataframe and output in the file ForecastSample.RData c. Exceedence or threshold probabilities for cm (e.g., Pr(cumulative events) > 25) are in the spreadsheet and shown in the computational explanations.
  3. Final forecasts (without all of the explanation, for the selected / reported model) are generated by final-update.R.
    The results are written out as spreadsheets (FAST-cm-Forecasts-DATE.xlsx) and parquet (FAST-Forecast-DATE.parquet) files.

One needs to execute the files in this repo to be able to fully generate the forecasts in the last step.
Overall, the interim steps generate over 2GB of simulated forecasts and data subsets of for the training and evaluation steps.

Acknowledgments

About

FAST Models for VIEWS cm data

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages