-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue 357: Move from fixed n with missing to flexible n (#392)
* initial change * fix tests * Add a test for new truncated Y_t support * expand unit tests of latent delay change * add doc string * add integration tests for EpiAwareObs after local tests
- Loading branch information
Showing
5 changed files
with
97 additions
and
22 deletions.
There are no files selected for viewing
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
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
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,52 @@ | ||
suite["Integration"] = BenchmarkGroup() | ||
|
||
let | ||
using Distributions | ||
|
||
obs = LatentDelay( | ||
Ascertainment( | ||
NegativeBinomialError(), Intercept(Normal(0, 1)); link = x -> exp.(x) | ||
), | ||
LogNormal(1.6, 0.2) | ||
) | ||
I_t = fill(100, 10) | ||
gen_obs = generate_observations(obs, I_t, I_t) | ||
suite["Integration"]["LatentDelay - Ascertainment"] = make_epiaware_suite( | ||
gen_obs) | ||
end | ||
|
||
let | ||
I_t = fill(10, 100) | ||
delay_obs = LatentDelay( | ||
LatentDelay( | ||
NegativeBinomialError(), | ||
[0.1, 0.2, 0.3, 0.4] | ||
), | ||
LogNormal(1.4, 0.2) | ||
) | ||
mdl = generate_observations(delay_obs, I_t, I_t) | ||
suite["Integration"]["LatentDelay-LatentDelay"] = make_epiaware_suite(mdl) | ||
end | ||
|
||
let | ||
obs = StackObservationModels( | ||
[ | ||
Ascertainment( | ||
NegativeBinomialError(), | ||
Intercept(Normal(0.5, 0.1)) | ||
), | ||
LatentDelay( | ||
PoissonError(), | ||
[0.1, 0.2, 0.3, 0.4] | ||
) | ||
], | ||
["cases", "deaths"] | ||
) | ||
|
||
Y_t = fill(10, 10) | ||
y_t = (cases = Y_t, deaths = Y_t) | ||
|
||
gen_obs = generate_observations(obs, y_t, Y_t) | ||
|
||
suite["Integration"]["StackObservationModels-LatentDelay-Ascertainment"] = make_epiaware_suite(gen_obs) | ||
end |