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

Problem with WhatIfClassif counterfactual generation #7

Closed
RifatMehreen opened this issue Sep 16, 2021 · 4 comments
Closed

Problem with WhatIfClassif counterfactual generation #7

RifatMehreen opened this issue Sep 16, 2021 · 4 comments

Comments

@RifatMehreen
Copy link
Collaborator

@andreash0, @susanne-207 I had been working on COMPAS dataset for recidivism. The generated counterfactuals are weirdly the same. I am attaching the screenshots here:

Code snippets:
You can see that generated 5 counterfactuals are exactly the same:
recidivism_1
recidivism_2

Plot:
Rplot_whatif

@andreash0
Copy link
Collaborator

WhatIf returns the k closest data points of x_interest as counterfactuals. Could it be that the data point that is returned as counterfactual exists multiple times in your dataset?

@RifatMehreen
Copy link
Collaborator Author

I checked the dataset and it seems that there are lots of duplicates in the dataset. I removed them and now the results are alright. Thanks.

@andreash0
Copy link
Collaborator

Great!

@susanne-207: Should we restrict the WhatIf counterfactual search space to unique observations?

X_search = unique(X_search)

@dandls
Copy link
Owner

dandls commented Dec 8, 2021

A bit late, but yes :)

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

No branches or pull requests

3 participants