diff --git a/pipeline/src/constructors/make_default_params.jl b/pipeline/src/constructors/make_default_params.jl index 162170ee5..d45a74945 100644 --- a/pipeline/src/constructors/make_default_params.jl +++ b/pipeline/src/constructors/make_default_params.jl @@ -22,7 +22,7 @@ function make_default_params(pipeline::AbstractEpiAwarePipeline) α_delay = 4.0 θ_delay = 5.0 / 4.0 lookahead = 21 - lookback = 35 + lookback = 90 stride = 7 return Dict( "Rt" => Rt, diff --git a/pipeline/src/constructors/make_tspan.jl b/pipeline/src/constructors/make_tspan.jl index a3bc2b455..6ca15f950 100644 --- a/pipeline/src/constructors/make_tspan.jl +++ b/pipeline/src/constructors/make_tspan.jl @@ -7,7 +7,7 @@ Constructs a time span for performing inference on a case data time series. This - `T::Union{Integer,Nothing} = nothing`: The `stop` point at which to construct the time span. If `nothing`, the time span will be constructed using the length of the Rt vector for `pipeline`. -- `lookback = 35`: The number of days to look back from the specified time point. +- `lookback`: The number of days to look back from the specified time point. # Returns A tuple `(start, stop)` representing the start and stop indices of the time span. @@ -16,7 +16,7 @@ A tuple `(start, stop)` representing the start and stop indices of the time span """ function make_tspan(pipeline::AbstractEpiAwarePipeline; - T::Union{Integer, Nothing} = nothing, lookback = 35) + T::Union{Integer, Nothing} = nothing, lookback) N = size(make_Rt(pipeline), 1) _T = isnothing(T) ? N : T return (max(1, _T - lookback), min(N, _T)) diff --git a/pipeline/src/infer/InferenceConfig.jl b/pipeline/src/infer/InferenceConfig.jl index d7bb4d2e4..336ca29f8 100644 --- a/pipeline/src/infer/InferenceConfig.jl +++ b/pipeline/src/infer/InferenceConfig.jl @@ -118,8 +118,10 @@ to make inference on and model configuration. function create_inference_results(config, epiprob) #Return the sampled infections and observations idxs = config.tspan[1]:config.tspan[2] + #Subselect the case data to the time span y_t = ismissing(config.case_data) ? missing : Vector{Union{Missing, Int64}}(config.case_data[idxs]) + #Run inference once inference_results = apply_method(epiprob, config.epimethod, (y_t = y_t,)