This repository has been archived by the owner on Feb 14, 2023. It is now read-only.
Metric Definitions: Added metric definitions endpoints + reponse bodies #33
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
General metric definitions can be queried by:
curl -X GET http://localhost:8080/metrics/spd/definition
returns
Statistical Parity Difference (SPD) measures imbalances in classifications by calculating the difference between the proportion of the majority and protected classes getting a particular outcome. Typically, -0.1 < SPD < 0.1 indicates a fair model, while a value outside those bounds indicates an unfair model for the groups and outcomes in question.
Specific metric descriptions are returned in metric query bodies:
returns
{"type":"metric","name":"DIR","value":0.17292587250695893,"specificDefinition":"The DIR of 0.172926 indicates that the likelihood of Group:gender=1 receiving Outcome:income=1 is 0.172926 times that of Group:gender=0.","id":"2b3e009a-ddf7-496e-843d-812893c3a478","timestamp":"2023-02-13T13:42:03.448+00:00","thresholds":{"lowerBound":0.8,"upperBound":1.2,"outsideBounds":true}}