-
Notifications
You must be signed in to change notification settings - Fork 1
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
Mkw hiv mort #26
Mkw hiv mort #26
Conversation
mwalte10
commented
Jul 27, 2023
- Integrated the HIV natural history bit for children off treatment
- changed all instances of hC to hc per jeff's comment in leapfrog check in on 25/7
- made all paed model functions have 'child' as the second word to indicate that they are paediatric functions
- removed all instances of hard coding related to age
- separated hc1 from hc2 for output of the hiv stratified population
Co-authored-by: Rob <39248272+r-ash@users.noreply.github.com>
jeff & maggie debugging
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 looks good. Adding a couple of small comments.
Please merge #11 into this branch and then re-review.
src/model_setup.h
Outdated
//Not sure how to do just a single value, ASK ROB | ||
// !!! TODO: Ask Rob about preferred approach to assigning a single value | ||
const double ctx_effect = parse_data<double>(data, "ctx_effect", 1)(0); // select the first element of a TensorMap1 and assign to double |
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.
@r-ash -- please review this. Need to set convention for how to parse a single value
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.
Added support into the code generation to manage this.
@r-ash here is the problem with the intermediate data |
Not sure about the code factor issues here, it is complaining about empty lines but is seemingly referencing an old commit. Those blank lines have been removed. |
@@ -58,6 +58,7 @@ void save_output(leapfrog::StateSaver<ModelVariant, double> &state_saver, | |||
int main(int argc, char *argv[]) { | |||
if (argc < 4) { | |||
std::cout << | |||
|
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.
@@ -107,6 +108,7 @@ int main(int argc, char *argv[]) { | |||
ss.hAG, // Age groups HIV 15+ | |||
1, // Scale CD4 mortality | |||
0.2, // initiation_mortality_weight | |||
|
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.
|
||
for (int g = 0; g < adult_ss.NS; ++g) { | ||
for (int s = 0; s < ss.NS; ++s) { |
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.
Ah good spot, we should switch elsewhere loop variable to s, I think it might still be g
in a lot of places. Doesn't need to be done in this PR though.
src/model_setup.h
Outdated
//Not sure how to do just a single value, ASK ROB | ||
// !!! TODO: Ask Rob about preferred approach to assigning a single value | ||
const double ctx_effect = parse_data<double>(data, "ctx_effect", 1)(0); // select the first element of a TensorMap1 and assign to double |
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.
Added support into the code generation to manage this.
for (int s = 0; s < ss.NS; ++s) { | ||
//less than 5 because there is a cd4 transition between ages 4 and 5 | ||
for (int a = 1; a < hc_ss.hc2_agestart; ++a) { | ||
for (int hd = 0; hd < hc_ss.hc1DS; ++hd) { | ||
for (int cat = 0; cat < hc_ss.hcTT; ++cat) { |
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.
Loop order here should be NS, hc1AG, hcTT, hc1DS
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #26 +/- ##
==========================================
+ Coverage 97.88% 98.28% +0.39%
==========================================
Files 18 18
Lines 1087 1222 +135
==========================================
+ Hits 1064 1201 +137
+ Misses 23 21 -2
☔ 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.
This looks good to me, there are a few bits of commented out code which I would be tempted to remove if they're not needed anymore, or add a comment about why they are commented out.
for (int hd = 0; hd < hc_ss.hc1DS; ++hd) { | ||
intermediate.children.hc_posthivmort(hd, cat, a, s) = | ||
state_next.children.hc1_hiv_pop(hd, cat, a, s) * (1 - cpars.hc1_cd4_mort(hd, cat, a)); | ||
//intermediate.children.hc_posthivmort(hd, cat, a, s) = state_next.children.hc1_hiv_pop(hd, cat, a, s) - (1.0 - cpars.ctx_effect * cpars.ctx_val(time_step)) * state_curr.children.hc1_hiv_pop(hd, cat, a, s) * cpars.hc1_cd4_mort(hd, cat, a); |
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 still needed at all?