epiforecasts / EpiSoon

Forecasting the effective reproduction number over short timescales
https://epiforecasts.io/EpiSoon/
Other
7 stars 3 forks source link

Wrapper for forecastHybrid #59

Closed seabbs closed 4 years ago

seabbs commented 4 years ago

fable has been shown to have a memory leak and so is not suitable for large scale applications. forecastHybrid looks like a good drop-in replacement and appears to be a robust package with a good feature set. A potential issue is that it does not support sampling of the forecast out of the box and so an approximation is needed (potentially

A small example of a simple implementation:

library(forecastHybrid)

rts <- EpiSoon::example_obs_rts

y <- rts$rt

model <- forecastHybrid::hybridModel(y, weights = "cv.errors", 
                                     rolling = TRUE, cvHorizon = 7,
                                     horizonAverage = TRUE, 
                                     windowSize = 7)

preds <- forecast(model)

plot(preds)