Open dsweber2 opened 9 months ago
Partially addressed in https://github.com/cmu-delphi/epiprocess/pull/397. Adding a specialized rolling mean fn in https://github.com/cmu-delphi/epiprocess/pull/400. We discussed and decided that a specialized rolling sd fn was unnecessary.
Profile of 7dav on dataset with 3 geos and 400k obs per geo, commit 7ae9e879
With the current implementation, we're unlikely to make epi_slide
much faster. A fair amount of the runtime is slider
setup and the actual computation (maybe 1/2-3/4 of total time), plus (lots of) low-level functions that are hard to replace.
In exploration tooling, https://github.com/cmu-delphi/exploration-tooling/blob/bbcef76a822c36f78d32669ab7b0461dea7a2302/R/data_transforms.R#L38-L47, the forecasters that use
epi_slide
to do averaging/sd take ~5-10x as long as those that don't. It is unclear if this is specific toepi_slide
or would hold for any method of doing this. Towards that end, we should do some profiling ofepi_slide
to make sure it isn't significantly slower than comparable methods, specifically for mean and standard deviation calculations.