Closed RifatMehreen closed 2 years ago
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?
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.
Great!
@susanne-207: Should we restrict the WhatIf counterfactual search space to unique observations?
X_search = unique(X_search)
A bit late, but yes :)
@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:
Plot: