A comprehensive set of fairness metrics for datasets and machine learning models, explanations for these metrics, and algorithms to mitigate bias in datasets and models.
I think there is a logic error in disparate_impact() and statistical_parity_difference(). The line if isinstance(self.metric, BinaryLabelDatasetMetric): should be if type(self.metric) is BinaryLabelDatasetMetric:, otherwise any class derived from BinaryLabelDatasetMetric, including ClassificationMetric, always goes to the first condition.
https://github.com/Trusted-AI/AIF360/blob/48acf62c827a00dff881d4b08903fee2d108a9b9/aif360/explainers/metric_json_explainer.py#L155
I think there is a logic error in
disparate_impact()
andstatistical_parity_difference()
. The lineif isinstance(self.metric, BinaryLabelDatasetMetric):
should beif type(self.metric) is BinaryLabelDatasetMetric:
, otherwise any class derived fromBinaryLabelDatasetMetric
, includingClassificationMetric
, always goes to the first condition.Cheers,