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

Create estimation validation loop #136

Merged
merged 20 commits into from
May 6, 2020
Merged

Create estimation validation loop #136

merged 20 commits into from
May 6, 2020

Conversation

Tanmay-Kulkarni101
Copy link
Contributor

Change the behavior of Dummy Outcome Refuter, so as to compare the behavior, keeping the value of the treatment constant.

We create an estimator for t=t_i and then find the value for the other values of t_i. This allows us to isolate the causal effect of
t from y during the optimization process.
Copy link
Member

@amit-sharma amit-sharma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me so far. Added a suggestion on how to simply data_preprocess method.
I guess you are now working on running the dummy outcome generator on the other chunks and then evaluating the effect?

dowhy/causal_refuters/dummy_outcome_refuter.py Outdated Show resolved Hide resolved
dowhy/causal_refuters/dummy_outcome_refuter.py Outdated Show resolved Hide resolved
dowhy/causal_refuters/dummy_outcome_refuter.py Outdated Show resolved Hide resolved
dowhy/causal_refuters/dummy_outcome_refuter.py Outdated Show resolved Hide resolved
dowhy/causal_refuters/dummy_outcome_refuter.py Outdated Show resolved Hide resolved
@Tanmay-Kulkarni101
Copy link
Contributor Author

In a nutshell, the plan is to train on a partition of a DataFrame, and then using the the trained data on the remaining part of the original data.

Copy link
Member

@amit-sharma amit-sharma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic is correct, but can be simplified in many cases.
Also there is a larger point of what to do when the pipeline actions contain only zero, noise or permute. does not make sense to create groups or validation set. I gave a suggestion in the inline comments. Let me know what you think.

dowhy/causal_refuters/dummy_outcome_refuter.py Outdated Show resolved Hide resolved
dowhy/causal_refuters/dummy_outcome_refuter.py Outdated Show resolved Hide resolved
dowhy/causal_refuters/dummy_outcome_refuter.py Outdated Show resolved Hide resolved
dowhy/causal_refuters/dummy_outcome_refuter.py Outdated Show resolved Hide resolved
dowhy/causal_refuters/dummy_outcome_refuter.py Outdated Show resolved Hide resolved
dowhy/causal_refuters/dummy_outcome_refuter.py Outdated Show resolved Hide resolved
dowhy/causal_refuters/dummy_outcome_refuter.py Outdated Show resolved Hide resolved
dowhy/causal_refuters/dummy_outcome_refuter.py Outdated Show resolved Hide resolved
dowhy/causal_refuters/dummy_outcome_refuter.py Outdated Show resolved Hide resolved
dowhy/causal_refuters/dummy_outcome_refuter.py Outdated Show resolved Hide resolved
- move func_args to the end of argument list
- replace X_chunk by X_train
All function calls now pass func_args as a variable length keyworded argument list ( **kwargs ).
Accordingly, all function calls and examples in the documentation have been changed.
- Move the no_estimator check out of the simulation loop
- Replace np.zeros with None
- Use a common variable validation_df to refer to the validation data
@amit-sharma
Copy link
Member

Thanks @Tanmay-Kulkarni101 . This looks ready to merge once you add a few tests.

@amit-sharma amit-sharma merged commit 7e0094d into py-why:master May 6, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants