aws / amazon-sagemaker-clarify

Fairness Aware Machine Learning. Bias detection and mitigation for datasets and models.
Apache License 2.0
67 stars 40 forks source link

Fix bug when calculating thresholds #108

Closed larroy closed 3 years ago

larroy commented 3 years ago

Description of changes:

Thresholds are not correct when there's less values in labels vs the ones in the thresholds, leading to trying to create an interval with [1,0] for example which should be [0, 1] which would raise an exception inside pandas.

Added a test.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.