You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cumsum, cumprod, dplyr::cummean would have to be used with (implicit?) .window_size = Inf, .align = "right". dplyr::{lag, lead} would need more logic. diff would need even more logic. convolve should use "filter" and may or may not require extra logic. growth_rate might just fit in, need to check.
Pro:
cumsum seems like it might be relatively common (calculating cumulative case counts by epikey) and better-recognized than the data.table::frollsum(adaptive = TRUE) alternative
cumsum, cumprod, dplyr::cummean are likely faster than the more general data.table::froll{mean,sum}(adaptive = TRUE)
We currently don't have lag & lead functionality directly in epiprocess
We've been asked about availability of convolution operations. (Though maybe this means it should be a separate function.)
Counter concerns:
Window size logic required might be messy.
cumsum's already possible via data.table alternative.
cumprod seems unlikely to be used except for probabilities, in which case it should probably be avoided & cumsum on log probs should be used so it will work on longer time series without becoming zero.
Lag and lead would then be filtered to be in input epikeytimes, which may or may not be what is wanted. More control and faster results could be obtained by moving & adding knobs to epipredict:::epi_shift.
The text was updated successfully, but these errors were encountered:
brookslogan
changed the title
Consider supporting cumsum, cumprod, dplyr::cummean, dplyr::lag, dplyr::lead in epi_slide_opt
Consider supporting cumsum, cumprod, dplyr::cummean, dplyr::lag, dplyr::lead, diff in epi_slide_optMar 10, 2025
brookslogan
changed the title
Consider supporting cumsum, cumprod, dplyr::cummean, dplyr::lag, dplyr::lead, diff in epi_slide_opt
Consider supporting cumsum, cumprod, dplyr::cummean, dplyr::lag, dplyr::lead, diff, convolve in epi_slide_optMar 13, 2025
brookslogan
changed the title
Consider supporting cumsum, cumprod, dplyr::cummean, dplyr::lag, dplyr::lead, diff, convolve in epi_slide_opt
Consider supporting cumsum, cumprod, dplyr::cummean, dplyr::lag, dplyr::lead, diff, convolve, growth_rate in epi_slide_optMar 13, 2025
cumsum
,cumprod
,dplyr::cummean
would have to be used with (implicit?).window_size = Inf, .align = "right"
.dplyr::{lag, lead}
would need more logic.diff
would need even more logic.convolve
should use"filter"
and may or may not require extra logic.growth_rate
might just fit in, need to check.Pro:
cumsum
seems like it might be relatively common (calculating cumulative case counts by epikey) and better-recognized than thedata.table::frollsum(adaptive = TRUE)
alternativecumsum
,cumprod
,dplyr::cummean
are likely faster than the more generaldata.table::froll{mean,sum}(adaptive = TRUE)
Counter concerns:
cumsum
's already possible viadata.table
alternative.cumprod
seems unlikely to be used except for probabilities, in which case it should probably be avoided &cumsum
on log probs should be used so it will work on longer time series without becoming zero.epipredict:::epi_shift
.The text was updated successfully, but these errors were encountered: