DiCE icon indicating copy to clipboard operation
DiCE copied to clipboard

Can't genetate counterfactuals for all query instances

Open djlwzw opened this issue 4 years ago • 3 comments

Hi, I trained an LSTM model using the feature vectors extracted from the data recorded by the students. I want to use DiCE to generate counterfactuals on the test set data, but I haven't found them. I want to know what caused it. And there will be a warning. Is it because there are many zeros in my feature vector?

An instance to query is like the following, image

image

djlwzw avatar Sep 14 '21 10:09 djlwzw

According to the tips given, I might adjust the values of some parameters, but I don’t know which parameters should be adjusted? And what should be the range of each parameter?

djlwzw avatar Sep 14 '21 13:09 djlwzw

The set of warnings indicate that those features have most of their values as 0 (median absolute deviation is 0). You may want to disable diversity and reduce the proximity constraint (increase the distance from the original point) to increase chances of CF generation. See the docs here for generate_counterfactualsmethod.

Specifically, you need to decrease the diversity and proximity weights.

amit-sharma avatar Oct 10 '21 11:10 amit-sharma

First of all thanks for your help, about this LSTM model has been able to find counterfactual explanations. Then I wanted to explain the CNN-LSTM model, and I also checked the description of the relevant documents, and tried to modify many kinds of parameters, but there was no counterfactual result. Is this combined model inappropriate? And it takes about 9 minutes to find a single counterfactual instance. Do you have any better suggestions? image image

djlwzw avatar Jan 16 '22 12:01 djlwzw