-
Notifications
You must be signed in to change notification settings - Fork 20
1442 Generic country Simulation #1466
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 #1466 +/- ##
==========================================
+ Coverage 97.29% 97.30% +0.01%
==========================================
Files 186 187 +1
Lines 15961 16027 +66
==========================================
+ Hits 15529 15595 +66
Misses 432 432 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| ] | ||
|
|
||
|
|
||
| def _normalize_country_name(country: str): |
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.
why do these functions start with "_"?
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.
This is a convention in python that indicates that this function (or even a variabble) is only used internally in this file.
mknaranja
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. Great addition. I went through it line by line with the debugger and checked here and there also for alternative if/else. I had some small comments + one bigger one for the aggregation of age groups.
I did not check if it works with a path provided and only briefly looked at the tests.
| for i, rows in enumerate(groups): | ||
| for j, cols in enumerate(groups): | ||
| block = matrix.values[np.ix_(rows, cols)] | ||
| aggregated.iat[i, j] = float(block.mean()) |
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 think this is not correct. First, the rows (or columns; depending on the orientation from-to) should be multiplied with the group size (0-4: x, 5-14: y, ...). Then you can add and eventually you divide by the sum of x+y... Right?
…a.py Co-authored-by: Martin J. Kühn <62713180+mknaranja@users.noreply.github.com>
Changes and Information
Please briefly list the changes (main added features, changed items, or corrected bugs) made:
ode_seir_contact_matrix_example.pyruns a simulation for a specified country with real contact and population dataIf 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)