DiCE genetic question
You have based DiCE genetic on GeCo if I understand correctly. Is there a way to 'group' features as they define in their paper; "The first statement says that education and income are correlated: GeCo will consider only counterfactual values that occur together in the data." So for instance if we have feature A and B, make sure that the algorithm always generates counterfactuals for which the combination of A=a and B=b exists in the training data.
Dice genetic currently has two methods of initialization:
kdtree, random
-
kdtree: If the initialization is set tokdtree, DiCE genetic picks the k (k is the number of counterfactuals desired by the user) closest points in the training set to the query instance.
- If k points from the training set satisfy other user-given constraints such as
permitted_range, features_to_vary, the returned k counterfactuals are from the training set. Since the algorithm would pick points within the training set, this method would ensure that correlations in the training data are taken care of. - Suppose only k' counterfactuals from the training dataset satisfy
permitted_range, features_to_vary, where k' < k. In this case, we return k-k' valid counterfactuals that satisfy constraints by sampling randomly from the range of each feature. Since the algorithm would generate points outside the training set, this method wouldn't necessarily ensure that correlations in the training data are taken care of for the remaining k-k' points.
-
random: If the initialization is set torandom, DiCE generates valid counterfactuals that satisfy constraints by sampling randomly from the range of each feature. Since the algorithm would generate points outside the training set, this method wouldn't necessarily ensure that correlations in the training data are taken care of.
@soundarya98, thanks for the nice explanation. I had a slightly different question, I am not able to figure out which is the method used in the paper. I am trying to reproduce the results but having a hard time understand the configuration that is being used in the original paper. It would be great if you can provide some clarity on that. Thanks,