-
Notifications
You must be signed in to change notification settings - Fork 74
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
Add split pairs metric #394
base: main
Are you sure you want to change the base?
Conversation
update localty_split_scores.py with split pairs metric
shortened some lines
Codecov Report
@@ Coverage Diff @@
## main #394 +/- ##
==========================================
- Coverage 87.83% 86.80% -1.04%
==========================================
Files 37 37
Lines 1735 1758 +23
==========================================
+ Hits 1524 1526 +2
- Misses 211 232 +21
Continue to review full report at Codecov.
|
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.
Thanks for the PR!
By the way, is locality_split_scores.py outdated? It looks like there is only support for CountySplit in updaters. Also the Shannon entropy metric seems to be calculated as though a VTD is a person. Is there code somewhere else that has updated metrics? If so, I am happy to contribute there.
I don't think so. FYI, most of the metrics that we use are implemented here: https://github.com/mggg/evaltools (docs). I'm not too familiar with the Shannon entropy metric, but maybe @apizzimenti or @jenni-niels knows more about that.
The PR looks good to me, so I'm approving it (although it might be more appropriate for this code to live in evaltools).
Also, if you get the chance to add unit tests for this metric, that'd be good (but not necessary, I think). Feel free to merge once you see this. |
It says "Only those with write access to this repository can merge pull requests." Need you to do that |
Hey @jacobwachspress — we're taking some time to review your PR, and are slotting it in with a number of other internal reviews we'll be conducting in the near future. In the meantime, would you be able to write us some unit tests and add them to your PR? Thanks! |
add split pairs metric to unit test
Sorry for the delay... I added analogous unit tests to the file where the other split scores are tested. However, I am having issues with the testing. First of all, it says "First-time contributors need a maintainer to approve running workflows." (I think this is because I am trying to change a file that does the unit tests....?) Second of all, the testing environment does not seem to be loading properly, instead terminating with this error: Installed /root/conda/lib/python3.8/site-packages/contourpy-1.0.5-py3.8-linux-x86_64.egg I would be surprised if the errors are related, but could you try hitting "approve and run" to see if the tests pass? My changes are so minor that I would be very surprised if they broke anything. EDIT: I think the shapely version error might just be an existing issue with the test_and_deploy workflow? And I might just be stumbling on it now because this is the first time my PR was tested via that workflow, as I modified a unit test |
Updating locality_split_scores.py with split pairs metric (see this github repo and paper for more details).
By the way, is locality_split_scores.py outdated? It looks like there is only support for CountySplit in updaters. Also the Shannon entropy metric seems to be calculated as though a VTD is a person. Is there code somewhere else that has updated metrics? If so, I am happy to contribute there.