Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename latent_model_model to latent_model #112

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading