-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
in favour of direct test of prior_predictive_plot
- Loading branch information
1 parent
111d355
commit ed176b5
Showing
4 changed files
with
132 additions
and
78 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
include("test_utils.jl") | ||
include("test_plot_funcs.jl") | ||
include("prior_pred_plot.jl") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
@testset "Prior pred plotting" begin | ||
using CairoMakie | ||
#pick a random scenario | ||
pipetype = [SmoothOutbreakPipeline, MeasuresOutbreakPipeline, | ||
SmoothEndemicPipeline, RoughEndemicPipeline] |> rand | ||
P = pipetype(; testmode = true, nchains = 1, ndraws = 2000, priorpredictive = true) | ||
inference_config = make_inference_configs(P) |> rand | ||
|
||
#Add missing data | ||
missingdata = Dict("y_t" => missing, "I_t" => fill(1.0, 100), "truth_I0" => 1.0, | ||
"truth_gi_mean" => inference_config["gi_mean"]) | ||
results = generate_inference_results(missingdata, inference_config, P) | ||
|
||
fig = prior_predictive_plot(results["inference_config"], results["inference_results"], | ||
results["epiprob"]; ps = [0.025, 0.1, 0.25]) | ||
|
||
@test fig isa Figure | ||
end |