DiCE icon indicating copy to clipboard operation
DiCE copied to clipboard

DiCE genetic question

Open martheveldhuis opened this issue 4 years ago • 2 comments

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.

martheveldhuis avatar May 03 '21 10:05 martheveldhuis

Dice genetic currently has two methods of initialization: kdtree, random

  1. kdtree: If the initialization is set to kdtree, 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.
  1. random: If the initialization is set to random, 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 avatar May 06 '21 11:05 soundarya98

@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,

prateeky2806 avatar Jun 17 '21 19:06 prateeky2806