-
Notifications
You must be signed in to change notification settings - Fork 16
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
932 Get_default of Parameter HighViralLoadProtectionFactor doesn't work as expected #1068
base: main
Are you sure you want to change the base?
Conversation
…lized with a valid function
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1068 +/- ##
=======================================
Coverage 96.88% 96.88%
=======================================
Files 140 140
Lines 11502 11504 +2
=======================================
+ Hits 11144 11146 +2
Misses 358 358 ☔ View full report in Codecov by Sentry. |
Thanks for fixing this. It might also be relevant for |
I have checked them (see |
Ah, yes, they have a different type. Why did we decide again that HighViralLoadProtectionFactor does not depend on age/virus type? Was this a result of some article? |
Yes, I believe it is based on an article that mentions only about days since onset of symptoms (https://doi.org/10.1093/cid/ciaa886). I guess we could also adopt it to CustomIndexArray with a general age/virus type for consistency. |
I understand our parameter From a technical point of view, I agree with you that we should make this dependant on virus variant and age, too, as this might very well differ. |
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 unfortunatley think this is a little convoluted. I think one can just change it to AgeGroup /Agegroup/ as an input parameter and this should work. I think we did this for the paper branch.
Also i think for now just agegroup is fine, let's not make things more complicated as needed right now, and 2 viruses in a simulation (where this would come in handy) is not planned and i think we need to change a greater amount then either way.
In the paper branch we just initialised it explicitly.
This is planned in the near future to study the overlap of two (or more) variants and to examine what it takes for one variant to dominate. I also don't think we have to change much in the rest of the codebase, as everything should already work with having two variants. Also, I don't think it created much of an overhead or making things more complicated. I leave the decision to you, @khoanguyen-dev . |
Didn't know! Then it's good. |
…otectionfactor-doesnt-work-as-expected
…otectionfactor-doesnt-work-as-expected
Since I could not find a detailed paper/article mentioning directly how the HighViralLoadProtectionFactor changes over time, some observations from the following paper: https://doi.org/10.1186/s12916-021-02220-0 and https://doi.org/10.1371/journal.pone.0243597: Data Overview:
I then assumed the data points:
They can of course be adjusted later for ExposureType, AgeGroup and VirusVariant. |
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.
We agreed to leave out a common initialization in the simulations for the HighViralLoadProtectionFactor, as there was no fitting literature. In the future, we might have to review this, perhaps in combination with the other ProtectionFactors.
This is from the changes on top of this PR. Is this still up-to-date? @khoanguyen-dev |
…otectionfactor-doesnt-work-as-expected
I updated the description. It is now a simple extension for this parameter. |
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 noticed that the pybinds were unchanged, perhaps this is a mistake from an earlier merge? I am confused why this was there in the first place, as it has nothing to do with this issue, but is also not on the main. What happened here?
pycode/memilio-simulation/memilio/simulation/bindings/models/abm.cpp
Outdated
Show resolved
Hide resolved
pycode/memilio-simulation/memilio/simulation/bindings/models/abm.cpp
Outdated
Show resolved
Hide resolved
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 we use ExposureType and TimePoint as pair for e.g. latest_exposure in the Infection ctor or the tests? I think using latest_exposure_time/_type as separate values is easier than using .first/,second everywhere, right?
Staying with the changes made in this branch, they look good to me, though there are merge conflicts with the newly merged #1072 (sorry) that have to be resolved before I can approve this.
Co-authored-by: reneSchm <[email protected]>
I think this got introduced when the function |
That makes sense. In that case, I think we could either split up the variables immediately after the function call, or we can add (yet another) simple struct for the protection. That way, we probably better preserve that the ExposureType is not used as (a person being) "exposed by", but rather as "protected from exposure by". |
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.
After the merge and additional renaming of Vaccine/ExposureType this is a very nice improvement.
Changes and Information
Please briefly list the changes (main added features, changed items, or corrected bugs) made:
Revised Definition of HighViralLoadProtectionFactor:
HighViralLoadProtectionFactor
to CustomIndexArray<InputFunctionForProtectionLevel, ExposureType, AgeGroup, VirusVariant>.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
Benchmark Time CPU Iterations
abm_benchmark/abm_benchmark_50k 2721 ms 2716 ms 1
abm_benchmark/abm_benchmark_100k 5682 ms 5674 ms 1
abm_benchmark/abm_benchmark_200k 11855 ms 11773 ms 1
Benchmark Time CPU Iterations
abm_benchmark/abm_benchmark_50k 3087 ms 2953 ms 1
abm_benchmark/abm_benchmark_100k 5698 ms 5690 ms 1
abm_benchmark/abm_benchmark_200k 11585 ms 11554 ms 1
Checks by code reviewer(s)
Closes #932