Skip to content

Commit

Permalink
rename make_epi_inference_model -> make_epi_aware
Browse files Browse the repository at this point in the history
  • Loading branch information
seabbs committed Feb 28, 2024
1 parent f1f2c2c commit 8f0c5df
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion EpiAware/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ DelayObservations"]
E["Turing model constructor
---------------------
make_epi_inference_model"]
make_epi_aware"]
G[Posterior draws]
H[Posterior checking]
Expand Down
2 changes: 1 addition & 1 deletion EpiAware/src/EpiAware.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export EpiData, Renewal, ExpGrowthRate, DirectInfections, AbstractEpiModel,
AbstractLatentModel, AbstractObservationModel

# Exported Turing model constructors
export make_epi_inference_model
export make_epi_aware

include("epi-models.jl")
include("utilities.jl")
Expand Down
2 changes: 1 addition & 1 deletion EpiAware/src/models.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@model function make_epi_inference_model(y_t,
@model function make_epi_aware(y_t,
time_steps;
epi_model::AbstractEpiModel,
latent_model_model::AbstractLatentModel,
Expand Down
4 changes: 2 additions & 2 deletions EpiAware/test/predictive_checking/toy_model_log_infs_RW.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ obs_model = EpiAware.DelayObservations([1.0],
We don't have observed data, so we use `missing` value for `y_t`.
=#

log_infs_model = make_epi_inference_model(missing, time_horizon, ; epi_model = epi_model,
log_infs_model = make_epi_aware(missing, time_horizon, ; epi_model = epi_model,
latent_model_model = rwp, observation_model = obs_model,
pos_shift = 1e-6)

Expand Down Expand Up @@ -140,7 +140,7 @@ We treat the generated data as observed data and attempt to infer underlying inf

truth_data = random_epidemic.y_t

model = make_epi_inference_model(truth_data, time_horizon, ; epi_model = epi_model,
model = make_epi_aware(truth_data, time_horizon, ; epi_model = epi_model,
latent_model_model = rwp, observation_model = obs_model,
pos_shift = 1e-6)
@time chn = sample(model,
Expand Down
12 changes: 6 additions & 6 deletions EpiAware/test/test_models.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

@testitem "`make_epi_inference_model` with direct infections and RW latent process runs" begin
@testitem "`make_epi_aware` with direct infections and RW latent process runs" begin
using Distributions, Turing, DynamicPPL
# Define test inputs
y_t = missing # Data will be generated from the model
Expand All @@ -26,7 +26,7 @@
Δd = Δd)

# Create full epi model and sample from it
test_mdl = make_epi_inference_model(y_t, time_horizon; epi_model = epi_model,
test_mdl = make_epi_aware(y_t, time_horizon; epi_model = epi_model,
latent_model_model = rwp,
observation_model = obs_model, pos_shift)
gen = generated_quantities(test_mdl, rand(test_mdl))
Expand All @@ -37,7 +37,7 @@
@test length(gen.I_t) == time_horizon
end

@testitem "`make_epi_inference_model` with Exp growth rate and RW latent process runs" begin
@testitem "`make_epi_aware` with Exp growth rate and RW latent process runs" begin
using Distributions, Turing, DynamicPPL
# Define test inputs
y_t = missing# rand(1:10, 365) # Data will be generated from the model
Expand All @@ -60,7 +60,7 @@ end
truncated(Gamma(5, 0.05 / 5), 1e-3, 1.0))

# Create full epi model and sample from it
test_mdl = make_epi_inference_model(y_t,
test_mdl = make_epi_aware(y_t,
time_horizon;
epi_model = epi_model,
latent_model_model = rwp,
Expand All @@ -76,7 +76,7 @@ end
@test length(gens[1].I_t) == time_horizon
end

@testitem "`make_epi_inference_model` with Renewal and RW latent process runs" begin
@testitem "`make_epi_aware` with Renewal and RW latent process runs" begin
using Distributions, Turing, DynamicPPL
# Define test inputs
y_t = missing# rand(1:10, 365) # Data will be generated from the model
Expand All @@ -99,7 +99,7 @@ end
truncated(Gamma(5, 0.05 / 5), 1e-3, 1.0))

# Create full epi model and sample from it
test_mdl = make_epi_inference_model(y_t,
test_mdl = make_epi_aware(y_t,
time_horizon;
epi_model = epi_model,
latent_model_model = rwp,
Expand Down

0 comments on commit 8f0c5df

Please sign in to comment.