Skip to content

Add Generalized Entropy-based metrics #676

Open

Description

@LeJit

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:

Activity

  1. romanlutz commented on Jan 13, 2021

    @romanlutz
    Member

    @LeJit can you elaborate on why it's better to have this separate from MetricFrame?

  2. LeJit commented on Jan 13, 2021

    @LeJit
    ContributorAuthor

    @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.

  3. adrinjalali commented on Jan 13, 2021

    @adrinjalali
    Member

    Aren't there metrics which ignore y_pred? That's how we support dataset metrics, don't we?

  4. romanlutz commented on Jan 15, 2021

    @romanlutz
    Member

    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.

  5. LeJit commented on Jan 15, 2021

    @LeJit
    ContributorAuthor

    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.

  6. adrinjalali commented on Jan 16, 2021

    @adrinjalali
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions