Code Monkey home page Code Monkey logo

compartmental-model's Introduction

Compartment model from AIforGood Simulator

Deon badge

AIforGood Simulator aims to provide epidimology modelling help to humanitarian NGOs who are working to contain coronavirus outbreak in refugee camps. Please fill out the contact form on our website if you want to get in touch or volunteer with us.

Model description

(pending a write up from Nick)

Running the repo

clone the repo and then change to the git directory and then:

pip install -r requirements.txt

Here is the workflow in generating CSVs for the report

  1. Prepare population level data

⋅⋅⋅Go to Parameters folder and open up camp_params.csv where you use the input the camp information and fill up the proportion for each age bracket and save it. Don't modify other camps information!

  1. Prepare contact matrix data (optional)

⋅⋅⋅Again in the Parameters folder, open up GenerateRandomParams.R where you can synthesize the contact matrix for the camp of interest. Save it as a seperate csv file.

  1. To run the baseline experiment
  • go to Scripts/fucntions.py and find the GenerateInfectionMatrix function to change where it is pointing to the contact matrix csv file
  • define the config file used to run the experiment and set up the name of the camp correctly as set out in the camp_params.csv
  • for a single run and just run the run_model.py file but notice the control parameters at the top (maybe we can build in some command line control here rather than modifying the py file every time)
python run_model.py
  1. To run different interventions
  • Modify the config.py under the Scripts directory to make copies with it along with appropriate naming convention

For example:

#running simulation with no intervention
from configs.baseline import camp, population_frame, population, control_dict
#running simulation with improving hygiene as an intervention
from configs.hygiene import camp, population_frame, population, control_dict
  • Can use the run_model_intervention.py file to run interventions in bulk (maybe we can build in multiprocessing here to speed up the run time)
  1. Retrieve outputs from CSV_output folder

⋅⋅⋅ These are the csvs that we will use to make a plot

compartmental-model's People

Contributors

billlyzhaoyh avatar nt409 avatar titorenko avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.