Repository navigation
Implement count as a metric - #812
Conversation
|
👋 @romanlutz, let me know what you think. |
romanlutz
left a comment
There was a problem hiding this comment.
This is great! Thanks for the comprehensive set of changes including all the existing occurrences throughout the user guide! Would you mind adding a few simple unit tests? I'm thinking for an empty group, group of 1, and something slightly longer.
|
Thanks for the speedy feedback 😄 I can definitely play around with adding some unit tests. |
romanlutz
left a comment
There was a problem hiding this comment.
Make sure to also run flake8 from the repo root to get all linting issues. There's currently only 1 but you never know 😄
| y_pred : array_like | ||
| The predicted labels (ignored) | ||
|
|
||
| sample_weight : array_like |
There was a problem hiding this comment.
If you're going to ignore it, don't include it.
There was a problem hiding this comment.
I'll remove it. I was trying to be consistent with this:
fairlearn/fairlearn/metrics/_selection_rate.py
Lines 20 to 27 in 8a76289
8a76289 to
147b7f5
Compare
|
I believe I have fixed everything mentioned here. Thanks for the feedback. How does this look? |
romanlutz
left a comment
There was a problem hiding this comment.
Looks great! There's the small comment about "subjects" I'd prefer to have changed, but otherwise this looks ready to merge to me. Let's see if the gates pass and @riedgar-ms probably should take another look as well.
|
I got that all fixed. I forgot to take out that line about "subjects", when I added the new one referring to "groups" above it. 🤦 I saw that issue #815 earlier when building the docs on my end, so that's great. Thanks for the thorough review! I learned a lot just by digging into this small new feature. |
ae22ddc to
c74a5f9
Compare
|
I'm working on fixing the broken tests after adding the |
85c43bb to
df6eee6
Compare
|
I have fixed the unit tests, so that |
|
LGTM! @riedgar-ms feel free to merge if you're happy with it. |
riedgar-ms
left a comment
There was a problem hiding this comment.
Thanks for working on this!
|
@stephenrobic last change request 😄 There's a file called CHANGES.md in the repo root directory. Can you add a line to the next release (0.7.0) saying that |
df6eee6 to
9345dd9
Compare
|
@riedgar-ms @romanlutz It was my pleasure to work on this and learn from it. Thank you for guiding me through this! |
|
Thanks @stephenrobic for this fantastic contribution! |
This PR seeks to implement
countas a metric, in order to decipher the number of data points in each group when working withMetricFrame.The following were updated:
countmetric wherever more than 1 metric is passed toMetricFramecountto notebooks whereverMetricFrame.countfunction infairlearn.metrics.extra_metricscounttofairlearn.metrics.group_metric_set(for consistency, even though deprecated)countunit.metrics.sample_dashboards)AUTHORS.md(and look forward to contributing more)This is in reference to issue #737