You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I want to incorporate generalized entropy and other information-theoretic metrics to FairLearn, both for evaluating the distribution of empirical distribution of outputs of a predictive model and the distribution of labels and protected groups in dataset.
Describe the solution you'd like
Create an Entropy method with the instantiation of the Generalized Entropy Index. From there, derived entropy metrics, such as the Atkinson Index, can be defined methods wrapping the Entropy function with specific input parameters.
Describe alternatives you've considered, if relevant
Add methods directly to MetricFrame class to support calculation of entropy-based metrics.
Additional context
Here are some use cases that use entropy or information-theoretic methods to assess fairness of a technical system:
@MiroDudik and I have been discussing how we can use entropy metrics to assess the distribution of labels and sensitive attributes in a dataset (to facilitate the creation of model cards and datasheets). I think it would be better to have it separate MetricFrame, so we can apply entropy metrics directly to the dataset rather than the outputs of a trained model.
Aren't there metrics which ignore y_pred? That's how we support dataset metrics, don't we?
That's what I thought and the reason why I asked :-) An example for what @adrinjalali means here is selection_rate. It doesn't matter what y_true is there because we only care about y_pred. One could imagine the same thing the other way round, of course.
We can implement it in MetricFrame for now, but I don't feel it's intuitive how to use MetricFrame to compute dataset metrics without actually looking at the code. Also, there's something I dislike about having to pass in a list of dummy values for y_pred to compute dataset metrics.
One thing to note is that a lot of metrics which need only one y can be applied to both the dataset and the output of the model, but they don't require y_true and y_pred at the same time. I agree that this can be confusing to users, and if they pass these metrics to tools such as GridSearchCV, there may be inconsistencies or unclearness in whether y_true is used or y_pred in that setting (y_pred should be used in this example). So I agree the API could be improved.
Activity
romanlutz commentedon Jan 13, 2021
@LeJit can you elaborate on why it's better to have this separate from
MetricFrame?LeJit commentedon Jan 13, 2021
@MiroDudik and I have been discussing how we can use entropy metrics to assess the distribution of labels and sensitive attributes in a dataset (to facilitate the creation of model cards and datasheets). I think it would be better to have it separate
MetricFrame, so we can apply entropy metrics directly to the dataset rather than the outputs of a trained model.adrinjalali commentedon Jan 13, 2021
Aren't there metrics which ignore
y_pred? That's how we support dataset metrics, don't we?romanlutz commentedon Jan 15, 2021
That's what I thought and the reason why I asked :-) An example for what @adrinjalali means here is
selection_rate. It doesn't matter whaty_trueis there because we only care abouty_pred. One could imagine the same thing the other way round, of course.LeJit commentedon Jan 15, 2021
We can implement it in
MetricFramefor now, but I don't feel it's intuitive how to useMetricFrameto compute dataset metrics without actually looking at the code. Also, there's something I dislike about having to pass in a list of dummy values fory_predto compute dataset metrics.adrinjalali commentedon Jan 16, 2021
One thing to note is that a lot of metrics which need only one
ycan be applied to both the dataset and the output of the model, but they don't requirey_trueandy_predat the same time. I agree that this can be confusing to users, and if they pass these metrics to tools such asGridSearchCV, there may be inconsistencies or unclearness in whethery_trueis used ory_predin that setting (y_predshould be used in this example). So I agree the API could be improved.