Welcome to the XPRIZE Pandemic Response Challenge! This repository contains what you need to get started in creating your submission for the contest.
Within this repository you will find:
To run the examples, you will need:
pip
for package management. The examples in this repo assume you are using such an environment.Having registered for the contest, you should also have:
Under the covid_xprize/examples
directory you will find some examples of predictors and prescriptors that you can
inspect to learn more about what you need to do:
predictors/linear
contains a simple linear model, using the
Lasso algorithm.predictors/lstm
contains a more sophisticated LSTM
model for making predictions.prescriptors/zero
contains a trivial prescriptor that always prescribes no interventions;
prescriptors/random
contains one that prescribes random interventions.prescriptors/neat
contains code for training prescriptors with NEATThe instructions below assume that you are using a standard Python virtual environment, and pip
for package
management. Installations using other environments (such as conda
) are outside the scope of these steps.
In order to run the examples locally:
PYTHONPATH
includes your current directory:
export PYTHONPATH="$(pwd):$PYTHONPATH"
pip install -r requirements.txt --upgrade
jupyter notebook
This causes a browser window to launch
linear
) and run through the steps in the associated
notebook -- in the case of linear
, Example-Train-Linear-Rollout-Model.ipynb
.Upon registering for the contest, you will have been given access to a "sandbox", a virtual area within the XPRIZE cloud within which you can submit your work.
In order for the automated judging process to detect and evaluate your submission, you must follow the instructions below. If your script does not conform to the API in any way, your submission will be omitted from judging.
work
directory.work
directory, you must provide a Python script with the name predict.py
. Examples of such scripts
are provided in this repository. This script will invoke your predictor model and save the predictions produced.predict.py
script, for example, by placing them in the work
directory or subdirectories thereof.work
directory when your script is called. Therefore,
references to other modules and resource files should be relative to that.python predict.py --start_date 2020-12-01 --end_date 2020-12-31 --interventions_plan ip_file.csv
--output_file 2020-12-01_2020_12_31.csv
start_date
and end_date
inclusive) and generate predictions in the path and file specified by
output_file
, using the provided intervention plan. Take careful note of the performance and timing requirements
in the Competition Guidelines for running your predictor. For more details on this API, consult the Competition Guidelines or the support Slack channel.
In order for the automated judging process to detect and evaluate your submission, you must follow the instructions below. If your script does not conform to the API in any way, your submission will be omitted from judging.
work
directory.work
directory, you must provide a Python script with the name prescribe.py
. Examples of such scripts
are provided in this archive. This script will invoke your prescriptions model and save the prescriptions produced.prescribe.py
script, for example, by placing them in the work
directory or subdirectories thereof.work
directory when your script is called. Therefore,
references to other modules and resource files should be relative to that.python prescribe.py --start_date 2020-12-01 --end_date 2020-12-31 --interventions_past ip_file.csv
--output_file 2020-12-01_2020_12_31.csv
start_date
and end_date
inclusive) and generate prescriptions in the path and file specified by
output_file
. Take careful note of the performance and timing requirements
in the Competition Guidelines for running your prescriptor. Example prescriptors can be found under covid_xprize/examples/prescriptors/
.
For more details on this API, consult the Competition Guidelines or the support Slack channel.
The repo also provides a trained standard predictor to train prescriptors against.
To use it, call covid_xprize/standard_predictor/predict.py
to make predictions.
See get_predictions
in covid_xprize/examples/prescriptors/neat/utils.py
and
generate_cases_and_stringency_for_prescriptions
in prescriptor_robojudge.ipynb
for examples of how to make this call.
For more information and support, refer to the competition guidelines or post your questions in the support Slack channel; you should have gained access to both of these when you created a login in the competition platform.
For a concrete visualization of what the competition is about, see Cognizant's COVID-19 intervention optimization demo. Using this dashboard you can select among different prescriptors from the Pareto Front to see the effect on prescriptions for intervention plans in various regions.
For more background information please see also the research paper From Prediction to Prescription: Evolutionary Optimization of Non-Pharmaceutical Interventions in the COVID-19 Pandemic.
Copyright 2020 (c) Cognizant Digital Business, Evolutionary AI. All rights reserved. Issued under the Apache 2.0 License.