Closed vpnagraj closed 2 years ago
we now have a script that will create forecasts by state going back 4 weeks prior to current date so we can compare against observed data:
https://github.com/signaturescience/fiphde/blob/glm-state/scratch/workflow-state.R
the end of that script generates a PDF with plots of forecasts that are annotated with location/model selected:
in general, these dont look too bad ... especially given the challenges of this particular forecast window (hospitalizations are rapidly rising in almost every state) and the extremely small counts.
another thing to consider is that the processing is kind of slow (~30 minutes). we should look into parallelizing
have a "true" forecast script (as opposed to the retrospective/evaluation forecasting) for state level targets via glm:
https://github.com/signaturescience/fiphde/commit/f3c63eb6a39852030d450b210fa06ffbeaa67e95
same deal with the evaluation script ... writes a plot of each state to PDF:
again. not bad. but some of these probably wouldnt make it to submission given plausibility of trends forecasted.
note that to get the dates working i did have to do a "pseudo nowcast" to get missing ILI for prior week (see https://github.com/signaturescience/fiphde/blob/glm-state/scratch/forecast-state.R#L15-L45). related to #43 .
code to parallelize glm forecasting implemented in https://github.com/signaturescience/fiphde/commit/21f614723efbef9b3fc2684037054cfd81e0c887
using furrr
(with 8 cores) instead of for
loop drops processing time from ~40 minutes to ~8 minutes.
going to close this for now since the "add more glm models" task is converted to its own issue.
we need to put together some code to run the count regression glm models at the state level.