Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question regarding correlated features #5

Open
martheveldhuis opened this issue May 3, 2021 · 1 comment
Open

Question regarding correlated features #5

martheveldhuis opened this issue May 3, 2021 · 1 comment

Comments

@martheveldhuis
Copy link

If I were to group feature A and feature B, and the candidate counterfactual only changes the value of A, will that candidate be rejected? Or is this grouping handled by the sampling space you create for this group of values for A and B?

I am not familiar with Julia so I apologize if this could easily be discerned from the code.

@mjschleich
Copy link
Owner

Hi Marthe,

Thank you for reaching out!

In GeCo there are two ways to encode that two features are correlated:

  1. You can use @group(p, A, B) to declare that A and B are correlated. In this case, the sampling algorithm will always sample values for both A and B, you cannot sample values for A or B independently. So the scenario that you described where only A is changed does not happen.

  2. The other option is to define a PLAF constraint to ensure that if A changes then B must change as well. For instance:
    @plaf(p, if cf.A != x.A; cf.B > x.B ) states that if A changes then B must increase.

Depending on your application, it may be better to use option 1 or option 2, but in general it will be more efficient if you use the GROUP operator whenever you can.

Please let me know if this clarified you question, or if there are any other bits that are unclear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants