Skip to content

Conversation

rahulbshrestha
Copy link
Contributor

This draft PR addresses this issue, by introducing the doubly robust estimator to doWhy. It also contains a tutorial notebook applying this algorithm to a demo dataset. This is a rough draft, so there will be lots of changes!

@rahulbshrestha rahulbshrestha marked this pull request as draft June 8, 2024 11:49
removed test file from commit

Add notebook and data

Signed-off-by: rahulbshrestha <[email protected]>
@rahulbshrestha rahulbshrestha force-pushed the doubly_robust_estimator branch from 9abeacc to ffa3a1d Compare June 8, 2024 12:04
@rahulbshrestha rahulbshrestha marked this pull request as ready for review June 20, 2024 10:52
@rahulbshrestha rahulbshrestha marked this pull request as draft June 20, 2024 10:53
@bloebp
Copy link
Member

bloebp commented Jul 29, 2024

@amit-sharma can you take a look?

Copy link

This PR is stale because it has been open for 60 days with no activity.

@github-actions github-actions bot added the stale label Sep 28, 2024
Copy link

This PR was closed because it has been inactive for 7 days since being marked as stale.

@github-actions github-actions bot closed this Oct 13, 2024
@bloebp bloebp reopened this Oct 14, 2024
@bloebp
Copy link
Member

bloebp commented Oct 14, 2024

@amit-sharma any chance to take a look?

@github-actions github-actions bot removed the stale label Oct 15, 2024
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.

@rahulbshrestha I've added some comments to iterate on the PR.

The estimator is still incomplete. So it needs some work before it can be merged.

from dowhy.utils.api import parse_state


class DoublyRobustEstimator(CausalEstimator):
Copy link
Member

Choose a reason for hiding this comment

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

The comment for this class may need to be changed. This estimator is for the standard backdoor setting when you want to combine propensity and adjustment methods.

estimation of conditional treatment effect over it.
:param first_stage_model: First stage estimator to be used. Default is
linear regression.
:param second_stage_model: Second stage estimator to be used. Default
Copy link
Member

Choose a reason for hiding this comment

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

change the default to propensityscore

**kwargs,
)
self.logger.warning("First stage model not provided. Defaulting to sklearn.linear_model.LinearRegression.")

Copy link
Member

Choose a reason for hiding this comment

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

do we need a similar custom initialization for the second stage model?

)

pass
#return estimate
Copy link
Member

Choose a reason for hiding this comment

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

these two estimates need to be combined using the doubly robust formula

"metadata": {},
"outputs": [],
"source": [
"data = pd.read_csv(\"./learning_mindset.csv\")\n"
Copy link
Member

Choose a reason for hiding this comment

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

you can add the dataset to the datasets/ folder.

Copy link

This PR is stale because it has been open for 60 days with no activity.

@github-actions github-actions bot added the stale label Dec 17, 2024
Copy link

github-actions bot commented Jan 1, 2025

This PR was closed because it has been inactive for 7 days since being marked as stale.

@github-actions github-actions bot closed this Jan 1, 2025
@amit-sharma amit-sharma reopened this Jan 1, 2025
@amit-sharma
Copy link
Member

@rahulbshrestha are you still interested in working on this PR? I think this will be a very valuable contribution to the community and added some comments.

@github-actions github-actions bot removed the stale label Jan 2, 2025
@rahulbshrestha
Copy link
Contributor Author

Hey @amit-sharma! Sorry, I've been a bit busy with my thesis, but I can work on this as soon as I get time.

Copy link

github-actions bot commented Mar 4, 2025

This PR is stale because it has been open for 60 days with no activity.

@github-actions github-actions bot added the stale label Mar 4, 2025
Copy link

This PR was closed because it has been inactive for 7 days since being marked as stale.

@github-actions github-actions bot closed this Mar 18, 2025
@nparent1
Copy link
Contributor

@rahulbshrestha I started a PR #1346 which addresses this same issue (adding the doubly robust estimator). Apologies, I did not see this PR when I started #1346. Were you planning to re-open this or is it fine for me to proceed with trying to get #1346 merged?

@rahulbshrestha
Copy link
Contributor Author

Hi @nparent1! Thanks for checking, and please feel free to proceed! I haven’t been actively working on this PR right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants