Skip to content
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

Time trend policy fix #498

Merged
merged 8 commits into from
Sep 3, 2024
Merged

Time trend policy fix #498

merged 8 commits into from
Sep 3, 2024

Conversation

jamesturner246
Copy link
Contributor

@jamesturner246 jamesturner246 commented Aug 20, 2024

Resolves #497

We want policy updates to be computed as a function of non-time-trended, expected val adjusted nutrient values. This means we need to do a big ugly second loop for expected value adjustment: the first without time trend, and the second one (after policy is computed) to produce the final value.

For this, we add a boolean flag apply_trend to the expect adjustment methods. We also separate the policy updating into separate compute and apply step functions, so that we can compute policies on non trended nutrients, and apply policies after time trends are applied.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

src/HealthGPS/static_linear_model.cpp Outdated Show resolved Hide resolved
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions[bot]

This comment was marked as resolved.

@jamesturner246 jamesturner246 marked this pull request as ready for review August 29, 2024 09:38
Copy link
Contributor

@alexdewar alexdewar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've only given it a fairly superficial look, but it seems to make sense.

@jamesturner246 jamesturner246 merged commit ca565d4 into main Sep 3, 2024
5 checks passed
@jamesturner246 jamesturner246 deleted the time_trend_policy_fix branch September 3, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

policy should be a fn of non-trend risk factors
2 participants