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
- The train-dev-test splits and analysis results
- The final models chosen and their interpretations
- 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.
- Run the VIEWS-startup repo to get the dataset as documented used here. This gets you all the data downloaded and setup for analysis.
- Run the
setup.Rscript.
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.
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.Rmodelselect-globe.Rmodelselect-valid.Rmodelselect-globe-valid.Rmodelselect-glmm-covar.Rscoring-cm.Rscoring-cm-valid.R
These create all of the training and validation datasets for the model selection.
The forecast model is then summarized in the FAST-cm.Rmd which selects and fits the final production model.
- Model comparison and selection is summarized in
FAST-cm.*related files, which are here in all the favorite flavors (Rmdfor code, and outputs inhtml/md). - Earlier (draft) results, forecast summaries, and explanations of the process are here
a. Spreadsheets summaries by country and month are in the repo as
*.xlsxfiles b. Forecast samples are in a dataframe and output in the fileForecastSample.RDatac. Exceedence or threshold probabilities forcm(e.g., Pr(cumulative events) > 25) are in the spreadsheet and shown in the computational explanations. - 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.
-
Support has been provided by NSF Award 2311142. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.
-
This is in support of models for Fast forward: Forecasting global emerging threats