From 73e80c174eb9f944766223026218c163944c14c0 Mon Sep 17 00:00:00 2001 From: Samuel Brand <48288458+SamuelBrand1@users.noreply.github.com> Date: Thu, 19 Dec 2024 11:56:25 +0000 Subject: [PATCH] base values on pipeline types --- .../create_postprocessing_dataframes.jl | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/pipeline/scripts/create_postprocessing_dataframes.jl b/pipeline/scripts/create_postprocessing_dataframes.jl index eb8a4fd4d..2cce5ea6c 100644 --- a/pipeline/scripts/create_postprocessing_dataframes.jl +++ b/pipeline/scripts/create_postprocessing_dataframes.jl @@ -1,10 +1,24 @@ using EpiAwarePipeline, EpiAware, JLD2, DrWatson, DataFramesMeta, CSV, MCMCChains +pipelinetypes = [ + MeasuresOutbreakPipeline, + SmoothOutbreakPipeline, + SmoothEndemicPipeline, + RoughEndemicPipeline +] ## Define scenarios -scenarios = ["measures_outbreak", "smooth_outbreak", "smooth_endemic", "rough_endemic"] + +scenarios = pipelinetypes .|> pipetype -> pipetype().prefix ## Define true GI means -true_gi_means = [2.0, 10.0, 20.0] +# Errors if not the same for all pipeline types +true_gi_means = map(pipelinetypes) do pipetype + make_gi_params(pipetype())["gi_means"] +end |> + ensemble_gi_means -> all([gi_means == ensemble_gi_means[1] + for gi_means in ensemble_gi_means]) ? + ensemble_gi_means[1] : + error("GI means are not the same") if !isfile(plotsdir("plotting_data/predictions.csv")) @info "Prediction dataframe does not exist, generating now"