8000 ENH Add post-processing algorithm "Discrimination Aware Decision Tree Learning" by Kamiran et al. by Hadyark · Pull Request #1057 · fairlearn/fairlearn · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ENH Add post-processing algorithm "Discrimination Aware Decision Tree Learning" by Kamiran et al. #1057

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 8000 terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

Hadyark
Copy link
@Hadyark Hadyark commented Apr 3, 2022

This PR will solve #1024 and implements the Relabeling from the paper Discrimination Aware Decision Tree Learning by Kamiran et al.

  • postprocessing technique code in fairlearn.postprocessing
  • unit tests in test.unit.postprocessing
  • descriptive API reference (directly in the docstring)
  • example notebook
  • 8000 a short user guide in docs.user_guide.mitigation.rst

Copy link
Member
@adrinjalali adrinjalali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @Hadyark .

A few notes:

  • Please make sure your lines are not too long, including in the documentation, lines should be <88 chars long.
  • The main entry point should be a somewhat scikit-learn compatible estimator, added to the corresponding __init__.py file and exposed publicly.
  • We follow numpydoc standard for docstrings, please have a look at the existing classes/methods and adapt the docstrings accordingly.
  • Your .ipynb notebook file should be converted into a .py file with the same format as the other examples in examples folder.

I have approved the CI and merging with the latest main should render your documentation for us here.

@alliesaizan
Copy link
Contributor

Hi @Hadyark, are you still interested in working on this PR?

@Hadyark
Copy link
Author
Hadyark commented Feb 12, 2025

@alliesaizan I'm sorry, I forgot about this PR a long time ago. I'll take a look at it this weekend

@TamaraAtanasoska
Copy link
Contributor

Hi @Hadyark! I solved the merge conflicts to rebase on main a few days ago and fixed the linting issues to see what the state of the PR is(doing that for all the bigger left over PRs atm), and all tests pass. You are able to pick up with a green CI and address the comments above. Some things have changed since 2022, but the general remarks stay. Let me know if you need any help with the sklearn compatibility!

@alliesaizan
Copy link
Contributor

@alliesaizan I'm sorry, I forgot about this PR a long time ago. I'll take a look at it this weekend

Sounds good, just let us know when it's ready for review!

@TamaraAtanasoska
Copy link
Contri 8000 butor

hi @Hadyark I think it would be much easier for you not to bother with the linting issues if you install the pre-commit hooks. Not sure if they were there in the version of the contributing docs a few years ago.

From the docs in https://fairlearn.org/v0.12/contributor_guide/development_process.html
Screenshot 2025-02-18 at 09 49 49

@Hadyark
Copy link
Author
Hadyark commented Feb 22, 2025

When you ask for a scikit-learn-compatible estimator, does this imply having the same parameters as the original methods? For the fit(...) method, I need to add a “sensitive” parameter. Is this a problem?

@taharallouche
Copy link
Member

Hi @Hadyark !

For the fit(...) method, I need to add a “sensitive” parameter. Is this a problem?

No it is not a problem, provided it is a keyword-argument of the fit method.

More generally, I believe scikit-learn compatibility is well explained here.

And as explained on this section you can check programmatically your estimator's compatibility, via unit tests, using this decorator.

You can see an example of how it is used to test the CorrelationRemover's compatibility for instance.

I had to make my estimator compatible recently so I might be able to help you. @TamaraAtanasoska is also more familiar with it, she helped me a lot to get it done.

@TamaraAtanasoska
Copy link
Contributor

hi @Hadyark, are you still interested in finishing this? should we open this for someone else to pick up in the case you are not? thanks for letting me know in advance!

@Hadyark
Copy link
Author
Hadyark commented Apr 20, 2025

I'd love to finish this MR, but I can't figure out how to modify my code to make it compatible with scikit-learn.

If you have someone in mind to pick up this case, don't hesitate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0