-
Notifications
You must be signed in to change notification settings - Fork 2
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
Formula mapping #43
Formula mapping #43
Conversation
@ericward-noaa Thank for putting this together and including the code you used for yellowtail. Thinking towards when I am working on assessment prioritization where I would like to reproduce the yellowtail index using the same model configuration and when I am estimating indices for a wide-range of species, many data limited, should we be adding a column in configuration csv for |
Yes -- I think adding a column for share_range would be great. No need to change it for the existing species in there, but would give some flexibility in the future |
I am testing the code in this pull request now and will have feedback when everything runs and/or suggested changes. |
@ericward-noaa I have tried running the yellowtail configuration code twice and am getting the following error: ℹ Fixing or mirroring I see the region column in the data$data_filtered[[1]] object. It seems to be happening after or late during fitting where the only two files being written are the hess_logical and ignore_fit.rds files. Any thoughts on why I may be getting this error? |
Yeah, I think I know what's going on. The changes work fine for the original configuration script -- but with the yellowtail example, the 'region' variable is included in the estimation model and not in the prediction grid. I think it's probably up to you or @okenk / @iantaylor-NOAA on how best to deal with this in a generalizable way (so it'd be easy to adopt the same models for similar species with splits in the future). The boundaries_data object is in there, but I haven't exactly figured out how the related function calls are working. If there are region IDs in the prediction grid already, the easiest thing to do would be to pass those into the formula, rather than the 'region' variable I created |
Related to the above question on the extra column for share_range, I think we also could use an extra column(s) describing the latitude breaks for indices generated in the domain. Right now, the max / min latitude and longitude columns are used for a priori filtering. Yellowtail is an example of a species we'd want to generate indices for multiple sub-regions (N/S of Pt Conception). The easiest thing to do would be one per row -- so the "yellowtail rockfish" row would correspond to "yellowtail north" -- and the extra columns would be something like index_lat_min / index_lat_max / index_lon_min / index_lon_max to denote the region of the prediction grid used for making the index. |
I have modified the configuration.csv adding a share_range column and have made modifications to the yellowtail row to match the configuration in the yellowtail example but have not pushed since I did not want to mess anything up without confirming that everything runs correctly. I think you are correct on why my run is throwing an error. I will work with @kellijohnson-NOAA to see if I can modify the grid to include or add a column when necessary depending upon the model configuration. |
…/indexwc into formula-mapping
@iantaylor-NOAA I have worked through these changes and am happy with all the changes. Would you like to review this prior to me merging this pull request? |
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 just did a really superficial review as I don't have time to dig into the detail configuration stuff right now and trust that both @chantelwetzel-noaa and @ericward-noaa know what they are doing.
I just pushed two minor additions to this pull request
@chantelwetzel-noaa, you're welcome to merge any time as far as I'm concerned. |
What was changed/addressed