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

[BUG] Fairness regularization #674

Closed
FBruzzesi opened this issue May 24, 2024 · 1 comment · Fixed by #679
Closed

[BUG] Fairness regularization #674

FBruzzesi opened this issue May 24, 2024 · 1 comment · Fixed by #679
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@FBruzzesi
Copy link
Collaborator

FBruzzesi commented May 24, 2024

Description

While investigating a failing test on #671, I notice the following lines in _FairClassifier:

if self.penalty == "l1":
    log_likelihood -= cp.sum((1 / self.C) * cp.norm(theta[1:]))

However the default norm computed from cvxpy is p2 (docs).
Additionally cp.norm already sums the values over.

My suggestion to clean the API a bit is to:

  • Allow "l2" regularization (currently cannot be specified)
  • Correct the formula for "l1" regularization
  • "none" should be None (?)

Finally, the theta[1:] should only be valid for fit_intercept=True, otherwise we should use theta "entirely".

Am I missing something?

@FBruzzesi FBruzzesi added bug Something isn't working enhancement New feature or request labels May 24, 2024
@FBruzzesi
Copy link
Collaborator Author

Started to work on this in patch/fair-classifier branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant