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

Add Propensity Score DAG to Knowledge Base #337

Merged
merged 5 commits into from
May 7, 2024

Conversation

NathanielF
Copy link
Contributor

Adding random seed to fix bug #336

and adding DAG write up re propensity scores as per #327

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Signed-off-by: Nathaniel <[email protected]>
@NathanielF
Copy link
Contributor Author

This should be good now @drbenvincent!

@NathanielF NathanielF requested a review from drbenvincent May 7, 2024 16:50
Copy link
Collaborator

@drbenvincent drbenvincent left a comment

Choose a reason for hiding this comment

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

Comments about the DAG notebook

  • Please add the remove-input cell tag to the new cell which builds the propensity DAGs in quasi_dags.ipynb
  • Could be worth briefly explaining $Y(0), Y(1)$ because so far we've got mentioned it and have nothing from the potential outcomes framework. Can be very brief - we'll likely end up with a specific page on the potential outcomes framework
  • Nit: Use of PS as an acronym without defining it

@@ -63,7 +63,7 @@ def test_regression_kink_gradient_change():

def test_inverse_prop():
df = cp.load_data("nhefs")
sample_kwargs = {"tune": 100, "draws": 100, "chains": 2, "cores": 2}
sample_kwargs = {"tune": 100, "draws": 500, "chains": 2, "cores": 2}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could add a random_seed kwarg to sample_kwargs in order to make test output deterministic.

So far this is not generally done in tests because we don't test for specific results, but it might be relevant here if you're getting numerical stability issues.

We do do it however in the docstring examples (under test by doctest) because there we do examine numerical results.

I'll leave it up to you, but this might be the more defensive play.

Copy link
Contributor Author

@NathanielF NathanielF May 7, 2024

Choose a reason for hiding this comment

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

Updated. Added Random seed and made the above changes

NathanielF added 3 commits May 7, 2024 20:50
Signed-off-by: Nathaniel <[email protected]>
Signed-off-by: Nathaniel <[email protected]>
Signed-off-by: Nathaniel <[email protected]>
@drbenvincent drbenvincent added the documentation Improvements or additions to documentation label May 7, 2024
@drbenvincent drbenvincent changed the title add Propensity Score DAG as Quasi-Experiment writeup Add Propensity Score DAG to Knowledge Base May 7, 2024
@drbenvincent drbenvincent merged commit 6ced6a9 into pymc-labs:main May 7, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants