-
Notifications
You must be signed in to change notification settings - Fork 399
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
Can't use ExponentiatedGradient with GridSearchCV #1196
Comments
Excellent question @tmcarvalho ! It appears that the gaping hole in our documentation for exp_grad_est = ExponentiatedGradient(
estimator=estimator,
sample_weight_name='classifier__sample_weight',
constraints=EqualizedOdds(difference_bound=epsilon),
)
exp_grad_est.fit(X_train, y_train, sensitive_features=A_train)
predictors = exp_grad_est.predictors_ The last line is the one of interest as you can see Aside from that, there's another problem, though. Typically, very few of the models actually have non-zero weights, so it's unlikely that you have hundreds of models from which you choose randomly. Additionally, you could just check those models in Let me know how it goes and if you have further questions! |
Thank you @romanlutz for your answer! It worked for me. |
Excellent. I think we should leave this issue open as a reminder to add documentation for this. |
Hi @romanlutz |
It sounds like you are tuning hyperparameters inside exponentiated gradient. I would recommend tuning the hyperparameters on your base model (in your example it's the RandomForestClassifier) without any unfairness mitigation--and then using the resulting hyperparameters in the call to exponentiated gradient. |
Hello @MiroDudik , just commenting to say that it would be really useful to have the information from the Credit loan decisions example notebook in the ExponentiatedGradient user guide entry. I've been looking for this everywhere and didn't find it until now! |
I want all the results of GridSearchCV and therefore, I need the cv_results_ from it. However, I passed the GridSearch to ExponentiatedGradient, and then I called the fit but after fitting the ExponentiatedGradient the cv_results_ were not returned.
Here is my code:
And here is the issue.
Any suggestion?
The text was updated successfully, but these errors were encountered: