Repository navigation
Fix binning function - #536
Conversation
for more information, see https://pre-commit.ci
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
for more information, see https://pre-commit.ci
|
From the meeting on Oct 13 we decided that we'll just use bin edges so that the bins are explicitly defined from the outset, instead of inferred based on the presumed bin centers. This brings the behavior of the After reviewing the use cases of The changes require updates of the workflow files. Here all the workflow files are updated, but I just wanted to make a note that these files are not what's being actively used in the FEAT team. We'll remove them once the function/workflow code becomes more stable. @rebeccathomas-NOAA : I will not merge until we meet on Thursday, because if we merge this your workflow will break. Let's figure out a good way to merge code changes and then update your workflow to run with the new code before we merge anything. |
|
Thanks for working on this! Some questions:
|
|
So ReviewNB in the old times provides better visibility of notebook changes than the GitHub native views (though I think GitHub is pretty good now, so maybe we can remove that at some point). The notebooks that got changed are just the documentation. You could check one of the hake_YEAR.py for the actual places the code needs to change. It’s pretty minimal- just the call to do the length and age binning, and the length bin and age bin specifications. And yeah it’ll be good to do it together when we meet. |
|
I'm self-merging this after the Oct 22 meeting where we agreed that merging this and for @rebeccathomas-NOAA and @dbashford-NOAA to update the affected scripts separately is the way to go. |
This PR aims to address #535 :
binify()by absorbingbinned_distribution()length_binned_weightsfunction (the calculation in this function can be simplified in a separate PR)Questions needing discussion:
binify()toadd_binning_intervals()-- it better describes what the function does, which is to add a column with the binning interval to the input dataframebin_columntocolumn_to_bin@rebeccathomas-NOAA : the questions above would require changing the workflow files. These are simple changes that can be easily done, but if we make the changes, all of us should make that changes at the same time, so that nothing breaks.
NOTE: I found out the tests for the functions I have reviewed so far did not test for the actual output values. This is problematic because then there is no guarantee on whether the functions are producing the right outputs. As I go through all the implementations in detail I'll make sure to add these really important tests.