-
Notifications
You must be signed in to change notification settings - Fork 20
1469 Correct nonageresolved indices in IDE-SECIR model #1472
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1472 +/- ##
==========================================
- Coverage 97.31% 97.30% -0.02%
==========================================
Files 187 187
Lines 16017 16017
==========================================
- Hits 15587 15585 -2
- Misses 430 432 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
reneSchm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice documentation for the new test. The only important comment is on line 278 regarding testing interactions between age groups.
| int Ri = get_state_flat_index(Eigen::Index(InfectionState::Recovered), group); | ||
| int Di = get_state_flat_index(Eigen::Index(InfectionState::Dead), group); | ||
| // The scheme of the ODE model for initialization is applied here. | ||
| populations[Eigen::Index(0)][Ri] = total_confirmed_cases[group] - populations[Eigen::Index(0)][ISyi] - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Off topic, but if a value is used as much as this Eigen::Index(0), it helps readability to give it a name. E.g. const Eigen::Index init_time_point = 0, if I read the context correctly.
| // Model with whole population in second age group with index 1. Use baseline values scaled by baseline_scaling. | ||
| considered_group = 1; | ||
| std::vector<ScalarType> N_vec_group1 = {0., baseline_scaling * population_baseline}; | ||
| std::vector<ScalarType> deaths_vec_group1 = {0., baseline_scaling * deaths_baseline}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have expected that the second test uses both populations to check that there are no unexpected interactions between age groups. With the current setup, any interactions between age groups vanishes (as the "other" age group is always 0), so in theory that could hide indexing errors.
Do you want to cover that case?
Changes and Information
In the IDE-SECIR model, two indices were not adapted for multiple age groups. This was corrected here and appropriate test was added to check the correctness of the ageresolved simulation.
Merge Request - Guideline Checklist
Please check our git workflow. Use the draft feature if the Pull Request is not yet ready to review.
Checks by code author
Checks by code reviewer(s)
Closes #1469