Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add US hospitalization forecast group #7

Open
wants to merge 42 commits into
base: main
Choose a base branch
from
Open

Add US hospitalization forecast group #7

wants to merge 42 commits into from

Conversation

Serena-Wang
Copy link
Collaborator

@Serena-Wang Serena-Wang commented Oct 29, 2021

  • Close issue add support for getting hospitalizations data #1
  • In mechbayes/jhu.py:
    • add load_us_covidcast() to load data for all target variables from covidcast.
    • use incident data for all locations, all target variable.
  • Update data cleaning functions and plot function to work with incident data.
  • In scripts/run_model.py, add boolean parameter use_hosp_as_death to indicate whether a model needs to replace death observations with hospitalization observations
  • Add hospitalization models and forecast group configuration
  • Add adjustment cases to hospitalization data
  • update existing adjustments to work with inc level case/death data
  • update score_place() to work with inc level truth data

Copy link
Owner

@dsheldon dsheldon left a comment

Choose a reason for hiding this comment

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

Nice work, @Serena-Wang! Most of the changes seem spot on. (I didn't check pandas manipulations very carefully.)

The only comments of significance were about the seeding process and the implications of dropping the first cumulative observation in SEIRD.py and SEIRD_renewal.py.

Seeding has always been a little fuzzy. My best guess is the changes are insignificant for incident forecasts but could matter for cumulative forecasts. I think we probably need to discuss exactly what we want there. It would be good if you could test what happens with cumulative forecasts, esp. with a start date well into the pandemic, to see what happens.

mechbayes/jhu.py Outdated Show resolved Hide resolved
mechbayes/jhu.py Outdated Show resolved Hide resolved
scripts/config.json Show resolved Hide resolved
scripts/run_model.py Show resolved Hide resolved
scripts/run_model.py Show resolved Hide resolved
mechbayes/models/SEIRD.py Show resolved Hide resolved
if death is None:
death0, death = (None, None)
else:
death0 = death[0]
death = clean_daily_obs(onp.diff(death))
death = clean_daily_obs(death[1:])

Copy link
Owner

Choose a reason for hiding this comment

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

I have a similar comment to the one in SEIRD.py --- how does this affect seeding and cumulative forecasts?

@@ -1,3 +1,4 @@
from pickle import FALSE
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is this doing?

Copy link
Collaborator

@elray1 elray1 left a comment

Choose a reason for hiding this comment

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

minimal comments other than what Dan already noted.

else:
variables = ['y', 'z']
observations= [confirmed, death]
observations= [confirmed.cumsum(), death.cumsum()]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Flagging this as a place where we might want to add in cum death on date before start_date

mechbayes/models/SEIRD.py Show resolved Hide resolved
@@ -332,7 +372,7 @@ def make_manual_adjustments(data, forecast_date):
# JHU: 2,029 historical cases; Ellis County reported 294
util.redistribute(data['TX']['data'], '2021-03-26', 2029+294, 90, 'confirmed')

util.redistribute(data['MN']['data'], '2021-03-25', 20, 20, 'death')
#util.redistribute(data['MN']['data'], '2021-03-25', 20, 20, 'death')
Copy link
Collaborator

Choose a reason for hiding this comment

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

did we just decide this was no longer necessary?

@@ -445,7 +485,7 @@ def make_manual_adjustments(data, forecast_date):

# https://github.com/CSSEGISandData/COVID-19/issues/3705
# (backdistributed week of March 1)
#util.redistribute(data['IA']['data'], '2021-02-19', 26775, 200, 'confirmed')
util.redistribute(data['IA']['data'], '2021-02-19', 26775, 200, 'confirmed')
Copy link
Collaborator

Choose a reason for hiding this comment

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

this was previously commented out but isn't anymore?

@elray1 elray1 self-requested a review January 12, 2022 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants