Giter Club home page Giter Club logo

cervical-cancer-abm's Introduction

Cervical Cancer Prevention Agent-Based Model

This model simulates the impact of several interventions on cervical cancer outcomes. The primary outcomes are cervical cancer incidence, mortality rates, and intervention costs. A secondary outcome (for some countries) is HPV prevalence. The interventions of interest include HPV vaccination, cervical cancer screening, and HIV treatment.

The simulation is implemented using python and primarily numpy based state classes.

Environment Setup

There are several ways to work with project code locally.

VirtualEnv Setup

If you already have python and pip installed on your computer, you can run the following from the repo directory:

pip install virtualenv
virtualenv python_env
source python_env/bin/activate
pip install -r docker/requirements.txt
pip install -e .

Docker Setup

docker-compose build

Running Scenarios/Iterations

Terminology

  • An iteration is a single model run, simulating the lifetimes of one group of women. It is characterized by a random seed and a set of model parameters.

  • A scenario is a collection of iterations that share the same set of model parameters but differ in their random seed. The purpose of a scenario is to observe how much variation one might expect in the model results given a particular set of parameters.

  • An experiment is a collection of scenarios whose model parameters differ. The purpose of an experiment is to compare the model results between different sets of model parameters.

Run.py

We will now provide examples for how to run scenarios or iterations, using Zambia as an example.

You can run one iteration of a scenario with:

python run.py experiments/zambia/scenario_base

You can run one x iterations of a scenario and use multiprocessing with:

python run.py experiments/zambia/scenario_base --n=x --cpus=2

Output

Running the experiment will produce several files and directories:

  • An overall log file will be created in the experiment directory.
  • One directory per iteration will be created inside each scenario directory. The iteration directory will contain:
    • Any output files containing the model results for that iteration.
    • A log file for that iteration.

Running the tests

To run the test suite, execute the following command from the project's root directory:

pytest

Profiling

sudo pyinstrument --html -o pyinstrument_test.html experiments/zambia/src/example.py

cervical-cancer-abm's People

Contributors

maduprey avatar

Stargazers

 avatar

Watchers

 avatar Ying Qin avatar Matt Finholt-Daniel avatar Chris Townsend avatar  avatar

Forkers

mcogutajamo

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.