Skip to content

Commit

Permalink
Merge pull request #112 from CDCgov/111-change-kwarg-latent_model_model
Browse files Browse the repository at this point in the history
rename `latent_model_model` to `latent_model`
  • Loading branch information
seabbs authored Mar 5, 2024
2 parents 00c7f43 + 0620ef5 commit 791d8e2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions EpiAware/src/models.jl
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
@model function make_epi_aware(y_t,
time_steps;
epi_model::AbstractEpiModel,
latent_model_model::AbstractLatentModel,
latent_model::AbstractLatentModel,
observation_model::AbstractObservationModel,
pos_shift = 1e-6)
#Latent process
@submodel latent_model, latent_model_aux = generate_latent(
latent_model_model,
@submodel Z_t, latent_model_aux = generate_latent(
latent_model,
time_steps)

#Transform into infections
@submodel I_t = generate_latent_infs(epi_model, latent_model)
@submodel I_t = generate_latent_infs(epi_model, Z_t)

#Predictive distribution of ascerted cases
@submodel generated_y_t, generated_y_t_aux = generate_observations(observation_model,
Expand Down
6 changes: 3 additions & 3 deletions EpiAware/test/test_models.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

# Create full epi model and sample from it
test_mdl = make_epi_aware(y_t, time_horizon; epi_model = epi_model,
latent_model_model = rwp,
latent_model = rwp,
observation_model = obs_model, pos_shift)
gen = generated_quantities(test_mdl, rand(test_mdl))

Expand Down Expand Up @@ -63,7 +63,7 @@ end
test_mdl = make_epi_aware(y_t,
time_horizon;
epi_model = epi_model,
latent_model_model = rwp,
latent_model = rwp,
observation_model = obs_model,
pos_shift)

Expand Down Expand Up @@ -102,7 +102,7 @@ end
test_mdl = make_epi_aware(y_t,
time_horizon;
epi_model = epi_model,
latent_model_model = rwp,
latent_model = rwp,
observation_model = obs_model,
pos_shift)

Expand Down

0 comments on commit 791d8e2

Please sign in to comment.