-
Notifications
You must be signed in to change notification settings - Fork 19
379 implement IDE model with age resolution #1083
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
379 implement IDE model with age resolution #1083
Conversation
…roups. Some changes in model.cpp to compute everything for different Age Groups.
…roups. It builds now.
…erything with one Age Group.
…cases_all_age_ma7.json
…compareWithPreviousRun for an example with three Age Groups.
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 work, this already looks really good! :)
Some things I noticed:
- When building I got an error for the ide_initialization_example. I think you haven't updated this yet?
- Also, the test when comparing with the previous runs are failing. I think you need to push the updated csv files.
- In the documentation I noticed that you often write Age Group and Infection Transition. We usually use the name of the class directly, i.e. AgeGroup and InfectionTransition. I remarked this in some cases but can you check this?
In the mean time there were some changes in the main in parameters_io. Can you merge the main branch into this branch and adapt the changes with respect to age groups? I think this shouldn't be too much.
I noticed that for SAFWrapper you added a constructor without any input. I will think about if there is another option without this. I also will look into the set function for the parameters.
If you have any questions, let me know and we can discuss it :)
|
I think there is no problem with using the getter instead of the setter when setting the parameters. |
|
We should prevent that we are dividing by 0 when computing the force of infection if the population in some age groups is 0. For this we can make use of the solution that was implemented in #1104 for the ODE model. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1083 +/- ##
==========================================
+ Coverage 96.59% 97.02% +0.43%
==========================================
Files 137 142 +5
Lines 11057 12016 +959
==========================================
+ Hits 10680 11658 +978
+ Misses 377 358 -19
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Thank you for your revision. I made some comments, mainly regarding types and naming.
What still needs some work in my opinion is whether the group variable is used as AgeGroup or as size_t in the methods in model.cpp. This is not consistent, e.g. get_transition_flat_index() takes size_t as input parameter and compute_compartment_from_flows() takes an AgeGroup. I would suggest to always use the same type for all functions so that type conversions when calling the functions can be avoided.
Regarding the question whether AgeGroup or size_t should be the default type: One problem is that, currently, we need AgeGroup when calling parameters and size_t when calling vectors such as m_transitiondistributions_support_max. By defining these vectors as CustomIndexArray (instead of the outer std::vector) we could use an AgeGroup when referring to this vector thus leading to less type conversions.
annawendler
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.
Thank you for your adaptations! I found some leftover inconsistencies regarding the types of input parameters for the member functions. Can you adapt this?
Another thing I noticed (sorry for not noticing earlier) is that the added files are quite big which makes the whole repo bigger which is undesirable e.g. as it takes longer to download. One way to avoid these additional files is to define a vector in the test directly that e.g. contains the results at the last time point and then only compare the results for the last time point. I made some suggestions in the code in test_ide_secir_ageres.cpp on how to do this. Can you adapt the tests for this? I also noticed that the file "ide-parameters-io-compare.csv" is not used anymore. Can you delete this file as well as the newly added files?
Otherwise I think this PR looks good and can be merged after these changes :)
… compare with last time point
annawendler
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.
I have some final remarks regarding the tests.
annawendler
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.
Looks good!
Changes and Information
Please briefly list the changes (main added features, changed items, or corrected bugs) made:
If need be, add additional information and what the reviewer should look out for in particular:
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 #379