DiCE icon indicating copy to clipboard operation
DiCE copied to clipboard

Counterfactual for subpopulation

Open tonyabracadabra opened this issue 2 years ago • 2 comments

Can DiCE be extended for calculating the counterfactuals for a subpopulation based on certain conditions?

tonyabracadabra avatar May 29 '22 17:05 tonyabracadabra

yes, you can provide a set of rows from a dataframe to the generate_counterfactuals method. One way is to filter the dataframe based on given conditions and then supply the filtered dataframe to generate_counterfactuals.

However, you will still get counterfactuals per row. Is that the goal?

amit-sharma avatar May 30 '22 04:05 amit-sharma

yes, you can provide a set of rows from a dataframe to the generate_counterfactuals method. One way is to filter the dataframe based on given conditions and then supply the filtered dataframe to generate_counterfactuals.

However, you will still get counterfactuals per row. Is that the goal?

I was thinking if there is a more efficient way of doing this, I was reading this https://arxiv.org/pdf/2103.11972.pdf and wonder if there is anything similar can help me achieving the contextual algorithm recourse

tonyabracadabra avatar May 30 '22 07:05 tonyabracadabra

The method from the arxiv paper is not currently implemented. Will be a great contribution if you/someone is up for it.

amit-sharma avatar Oct 20 '22 04:10 amit-sharma