Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH Add "Reweighing" #1017

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Conversation

SeanMcCarren
Copy link
Contributor

@SeanMcCarren SeanMcCarren commented Feb 2, 2022

Add Reweighing preprocessing technique. #784

Design choices:

  • Meta estimator
  • Only 1d y and 1d sensitive_features

Progress

  • preprocessing technique code in fairlearn.preprocessing
  • unit tests in test.unit.preprocessing
  • descriptive API reference (directly in the docstring)
  • ideally a short user guide in docs.user_guide.mitigation.rst (I don't know if I should put time into this because mitigation.rst is about to change)

During this implementation, I thought of some improvements in future versions. I don't want to make an issue but here are my thoughts:

  • casting categorical multi-column sensitive feature to single column (to support >1d)
  • laplace smoothing
  • the next algorithm in the original paper also seems interesting, and will likely share code with this one. It is the resampling. This can also be made as something else than a meta estimator? We fit and then continuously data can be sampled according to the fitted weights.

@SeanMcCarren SeanMcCarren changed the title Reweighing ENH Add "Reweighing" Feb 2, 2022
@romanlutz romanlutz added the enhancement New feature or request label Feb 4, 2022
@SeanMcCarren SeanMcCarren marked this pull request as ready for review February 15, 2022 15:35
@SeanMcCarren
Copy link
Contributor Author

Hey @romanlutz , in #784 you mention you'd ideally have a short section in mitigation.rst about this. Does that still hold now? I remember hearing that mitigation.rst will be changed a lot so don't know if it is wiser to add this as an issue for later?

@romanlutz
Copy link
Member

Multi-dimension support for sensitive features should be added in the first version simply because we already have functionality to map multiple into a single dimension. If you need a reference please lmk and I'll send it (currently typing on phone).

The user guide would be nice to have in the first version, too. I think that's one of the requirements we have these days for adding new functionality. The mitigation.rst is typically undergoing changes, and I think that will always be like this. Just add your changes where you think it's best and we'll reevaluate then. I'm sure it's easy to adjust as this doesn't build onto an existing section of content. Does that make sense to you?

@SeanMcCarren
Copy link
Contributor Author

SeanMcCarren commented May 9, 2024

Multi-dimension support for sensitive features should be added in the first version simply because we already have functionality to map multiple into a single dimension. If you need a reference please lmk and I'll send it (currently typing on phone).

Done!

The user guide would be nice to have in the first version, too. I think that's one of the requirements we have these days for adding new functionality. The mitigation.rst is typically undergoing changes, and I think that will always be like this. Just add your changes where you think it's best and we'll reevaluate then. I'm sure it's easy to adjust as this doesn't build onto an existing section of content. Does that make sense to you?

Please have a look :)

@SeanMcCarren SeanMcCarren force-pushed the reweighing branch 2 times, most recently from 06a54fd to 0682df9 Compare May 10, 2024 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants