Skip to content

Commit

Permalink
add a benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
seabbs committed Jul 24, 2024
1 parent c97090b commit ee3e70e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion EpiAware/src/EpiObsModels/modifiers/Aggregate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ end

@model function EpiAwareBase.generate_observations(ag::Aggregate, y_t, Y_t)
if ismissing(y_t)
y_t = fill(0.0, length(Y_t))
y_t = Vector{Missing}(missing, length(Y_t))
end

n = length(y_t)
Expand Down
6 changes: 6 additions & 0 deletions benchmark/bench/EpiObsModels/modifiers/Aggregate.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
let
I_t = fill(10, 100)
weekly_agg = Aggregate(PoissonError(), [0, 0, 0, 0, 7, 0, 0])
mdl = generate_observations(weekly_agg, I_t, I_t)
suite["Aggregate"] = make_epiaware_suite(mdl)
end

0 comments on commit ee3e70e

Please sign in to comment.