Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

Fix and refactor SIR model main #16

Merged
merged 4 commits into from
May 5, 2020
Merged

Fix and refactor SIR model main #16

merged 4 commits into from
May 5, 2020

Conversation

marksibrahim
Copy link

@marksibrahim marksibrahim commented May 5, 2020

Updates loading of confirmed cases and output of main():

  • added best set of hyperparameters for NJ / NY
  • adjusted loading of confirmed cases to return a dataframe with corresponding dates
  • added flag for filtering unkowns and shared loading logic between state-wide and region loading
  • relabeled columns in main to show infected and recovered with doubling time
  • updated tests

Test Plan

  • ran unit tests python -m pytest tests/
  • verified output of python sir.py -fdat data/nystate/timeseries.h5 -fpop data/population-data/US-states/new-york-population.csv -days 8 -keep 7 -window 10 -doubling-times 14 16
  • verified output of python cv.py cv/ny.yml sir

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 5, 2020
sir.py Outdated
return df


def _date_plus(date, days):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have this return a datetime object? It seems odd that it takes one in, but then returns a string.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, will do.

@lematt1991
Copy link
Contributor

This looks great! Added one small nit inline.

@marksibrahim marksibrahim merged commit df369df into master May 5, 2020
@marksibrahim marksibrahim deleted the fix-sir-main branch May 5, 2020 16:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants