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

[External] Counterfactual sampling in price-tagging tutorial utils code #28

Closed
dangng2004 opened this issue Dec 16, 2023 · 4 comments
Closed
Assignees

Comments

@dangng2004
Copy link

Hello,

I was wondering what exactly the counterfactual sampling procedure in lower_bound_alignment_example_sampler does. Do the base and counterfactual labels have to be different, or can they be the same? For example, for a counterfactual label like "No", do we only want to sample base and source amounts such that the base label "Yes" is changed to "No" after intervention, or can the base label also be "No"? The code seems to suggest the latter scenario.

In that case, I put in in-line comments for what seems like a potential bug. When base_source_regions is [2, 3], The base left and right boundary values are (Yes, Yes), and that of the source is (Yes, No). The base label is "Yes", but after intervening on the left boundary, it is still "Yes". Any clarification is much appreciated!

alignment_bug
@frankaging
Copy link
Collaborator

Hey! Thanks for the inputs, and I think you are right! That row should be in the upper if block.

If you are willing to, do you want to change that and submit PR? I will merge it as a quick fix.

On my end, I will update the tutorial results once I have more time as well as other changes needed. I will also just go back and check all my old data gen function to make sure nothing big is missing. Hopefully, this will make alignment easier to find, since it creates noise during the learning process.

Thanks again! Much appreciated!

@frankaging
Copy link
Collaborator

And yes, counterfactual label and base label can be the same, which is a no change (null) intervention.

@frankaging
Copy link
Collaborator

@dangng2004 hey, I updated the code as well as the tutorial! the evaluation results increased slightly due to this change. Thanks again for catching this!

@frankaging frankaging self-assigned this Dec 17, 2023
@frankaging frankaging changed the title Counterfactual sampling in price-tagging tutorial utils code [External] Counterfactual sampling in price-tagging tutorial utils code Dec 18, 2023
@dangng2004
Copy link
Author

Glad I could help!

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