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

Fixed propensity example #70

Merged
merged 11 commits into from
Jul 24, 2024
Merged

Conversation

FrancescMartiEscofetQC
Copy link
Contributor

@FrancescMartiEscofetQC FrancescMartiEscofetQC commented Jul 24, 2024

As explained in #54 we want to support some method of passing "fixed" propensity scores. This PR does not change any in the implementation but rather shows how one can do it with the existing implementation creating a custom model.

Rendered version

Checklist

  • Added a CHANGELOG.rst entry

@FrancescMartiEscofetQC FrancescMartiEscofetQC marked this pull request as ready for review July 24, 2024 13:33
Copy link

codecov bot commented Jul 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.88%. Comparing base (a1ee27c) to head (f620c69).
Report is 19 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #70   +/-   ##
=======================================
  Coverage   94.88%   94.88%           
=======================================
  Files          15       15           
  Lines        1544     1544           
=======================================
  Hits         1465     1465           
  Misses         79       79           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@kklein kklein left a comment

Choose a reason for hiding this comment

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

Sweet - thanks!

docs/examples/example_propensity.ipynb Outdated Show resolved Hide resolved
docs/examples/example_propensity.ipynb Outdated Show resolved Hide resolved
docs/examples/example_propensity.ipynb Outdated Show resolved Hide resolved
docs/examples/example_propensity.ipynb Outdated Show resolved Hide resolved
"metadata": {},
"source": [
"```{note}\n",
"This is not true for this dataset but we use it for illustration purposes.\n",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think I got the point but it might be worth replacing the pronoun 'this' with the subject you are referring to reduce the likelihood of a misunderstanding. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kklein
Copy link
Collaborator

kklein commented Jul 24, 2024

Copy link
Collaborator

@kklein kklein left a comment

Choose a reason for hiding this comment

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

Thank you!

@FrancescMartiEscofetQC FrancescMartiEscofetQC merged commit 2f428fb into main Jul 24, 2024
16 checks passed
@FrancescMartiEscofetQC FrancescMartiEscofetQC deleted the fixed_propensity_tutorial branch July 24, 2024 14:37
@apoorvalal
Copy link
Contributor

Would using DummyClassifier also work? With strategy prior, this spits out the empirical propensity score (so this isn't strictly a 'known' pscore estimator but in moderate-to-large samples will be basically accurate).

The econml analogue works well.

@kklein
Copy link
Collaborator

kklein commented Aug 2, 2024

Absolutely - great point!

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.

3 participants