Uses distribution in data to set up uncertainty - #1678
Conversation
| list("parameters", "sd"), | ||
| .default = NA_real_ | ||
| ) | ||
| new_module$log_sd[] <- log(sd_values) |
There was a problem hiding this comment.
Do we need to add checks here to ensure sd_values are valid? R won't throw an error if .default = NA_real_. Do we need to check some potential edge cases as well, such as sd_value being 0 or negative?
There was a problem hiding this comment.
Great suggestion @Bai-Li-NOAA . I added one to check that sdlog and sd are always positive values. Are there any other checks that you can think of?
Bai-Li-NOAA
left a comment
There was a problem hiding this comment.
I think I ended up leaving more non-blocking suggestions that could become follow-up issues. 😉 Let me know if you have any questions.
31f86fa to
9e227b3
Compare
9e227b3 to
8fdb696
Compare
63391b9 to
ad95800
Compare
No longer passes the uncertainty to parameters. The distributional assumption now lives in the data.
* increment version and add NEWS for both PRs
4ce1dde to
bfd9a0b
Compare
|
@Bai-Li-NOAA I did quite a bit of work to this branch since your review. I think that we should merge it into your branch as a single commit and then merge the whole thing into main. I am going to open a PR in r4ss/r4ss and NOAA-FIMS/case-studies to update both of the repos to use this new version and I would like to get approval of those two PRs before we merge this stuff into main. That way people are reviewing the user experience rather than the logic. What do you think? |
What is the feature?
How have you implemented the solution?
parse_data_distribution()parses this out into a list which is then used to set up the data distributions among other thingsDoes the PR impact any other area of the project, maybe another repo?
Instructions for code reviewer
👋Hello reviewer👋, thank you for taking the time to review this PR!
nit:(for nitpicking) as the comment type. For example,nit:I prefer using adata.frame()instead of amatrixbecause ...This PR is now ready to be merged.Checklist