reichlab / idforecastutils

utility functions for various forecasting models, exercises, and rounds
0 stars 0 forks source link

consider evaluating predictive cdfs at a vector of category boundaries rather than looping over them #4

Open elray1 opened 7 months ago

elray1 commented 7 months ago

looking at this code: https://github.com/reichlab/idforecastutils/blob/b137497b0bbe8c59210dcecb37214ad133740d52/R/get_pmf_forecasts_from_quantile.R#L91-L120

It seems like we should be able to avoid the for loops here by:

It may be helpful to split all of that functionality out into a helper function

elray1 commented 7 months ago

You may be able to adapt some ideas in this code: https://github.com/Infectious-Disease-Modeling-Hubs/example-complex-forecast-hub/blob/main/internal-data-raw/create_model_output_data.R