Giter Club home page Giter Club logo

ounceofprevention-public's Introduction

OunceOfPrevention

Paper archive for "Optimal Health Investment: An Ounce of Prevention at Half Price?"

Matthew N. White

([email protected])

July 31, 2018

Code replication instructions: (More comprehensive, user-friendly instructions are coming)

  1. Download and install Anaconda for Python 2.7

  2. At a command prompt, install additional packages by typing:

conda install joblib

conda install dill

pip install opencl4py

On Windows, you might need to open the Anaconda prompt.

  1. If your computer does not have an OpenCL platform installed, install one. It is extremely likely that OpenCL is already installed on your computer, as it is included in the drivers for most graphics cards manufactured since 2014, including Intel integrated graphics chips, and all installations of Mac OSX since 2012.

  2. In ./Python/JorgensenDruedahl3D.py, change the line that sets the environment variable "PYOPENCL_CTX" to be the platform and device number of your choice.

TODO: Expand instructions on how to view list of devices.

  1. In ./Python/HealthInvEstimation.py and ./Python/HealthInvCounterfactuals.py, search for "num_jobs" (no quotes), and set this to an integer no greater than the number of cores on your computer (and no higher than 10). On a high end i7, the code ran faster with num_jobs set to 5; on an AMD Threadripper (32 cores), the code ran fastest with num_jobs=10.

  2. To run estimation-type tasks, set the boolean flags near line 1000 of HealthInvEstimation.py to choose what kind of work you want to do. You will need to scroll down to see specific details of what will be done and set variables as appropriate.

  3. To run counterfactuals, set the boolean flags near line 600 of HealthInvCounterfactuals.py to choose which exercises to run. If you want to run new experiments, the code that is there should guide you toward making new instances of SubsidyPolicy.

ounceofprevention-public's People

Contributors

mnwhite avatar

Watchers

 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.