Code Monkey home page Code Monkey logo

dearwatchcovid-19's Introduction

DearWatchCOVID-19

Code to reproduce the results from "Dear Watch, Should I Get a COVID-19 Test? Designing deployable machine learning for wearables"

Requirements

Python 3, PyTorch, XGBoost, NumPy, Scikit-Learn, Pandas, and Jupyter Notebooks. Packages are installed using Anaconda3

CPU machine with >100 GB RAM

GPU and multicore CPU is an asset.

Data Access

Data can be obtained through access procedures described in prior work. Qualified researchers can request access at https://www.synapse.org/#!Synapse:syn22891469/wiki/605716

Usage

First, convert the weekly surveys into day-level labels merged with the wearable data and baselines. Run the cells in dataloader.ipynb to get an HDF file with the preprocessed data. Preprocessing options like regular or irregular sampling can be selected in this file.

To run a randomly split, time agnostic model using:

python run_model.py --data_dir /datasets/evidationdata --output_dir ./tmp_dir --batch_size 32

To run the temporal models, please follow these steps:

# create a directory with a split of prospective train participants

python split_df_v_time.py --data_dir </path/to/data>' --output_dir </path/to/output> --target ili --regularly_sampled --less_space


# now run the models. See the following scripts for slurm examples 
./run_splits_xgboost.sh </path/to/output> ili woy noz standard regular imp 1 2019-10-01 notbound #this launches scripts to train all weeks' xgboost models, gru survey models, and evaluates both. Please see run_model.py --help for argument descriptions.

./run_splits_grud.sh </path/to/output> ili woy regular 1 

Many metrics in the text are acquired through functions found in get_stats.py: Please contact the authors for Notebooks which recreate plots.

If you use this code please cite

@article {Nestor2021DearWatch,
    author = {Nestor, Bret and Hunter, Jaryd and Kainkaryam, Raghu and Drysdale, Erik and Inglis, Jeffrey B and Shapiro, Allison and Nagaraj, Sujay and Ghassemi, Marzyeh and Foschini, Luca and Goldenberg, Anna},
    title = {Dear Watch, Should I Get a COVID-19 Test? Designing deployable machine learning for wearables},
    elocation-id = {2021.05.11.21257052},
    year = {2021},
    doi = {10.1101/2021.05.11.21257052},
    publisher = {Cold Spring Harbor Laboratory Press},
    URL = {https://www.medrxiv.org/content/early/2021/05/17/2021.05.11.21257052},
    eprint = {https://www.medrxiv.org/content/early/2021/05/17/2021.05.11.21257052.full.pdf},
    journal = {medRxiv}
}

dearwatchcovid-19's People

Contributors

bnestor avatar

Watchers

James Cloos avatar Erik Drysdale avatar Ben Brew avatar  avatar

Forkers

streakyran

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.