-
Notifications
You must be signed in to change notification settings - Fork 1k
[Repo Assist] fix: correct categorical groupby KeyError and pandas FutureWarning in dummy_outcome_refuter #1460
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
2cdbcf7
9fc4daf
5698184
b7d0e71
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,18 @@ def test_refutation_dummy_outcome_refuter_default_binary_treatment( | |
| refuter_tester = SimpleRefuter(error_tolerence, estimator_method, "dummy_outcome_refuter") | ||
| refuter_tester.binary_treatment_testsuite(tests_to_run="atleast-one-common-cause", num_samples=num_samples) | ||
|
|
||
| @mark.parametrize( | ||
| ["error_tolerence", "estimator_method", "num_samples"], | ||
|
||
| [(0.1, "backdoor.propensity_score_matching", 1000)], | ||
| ) | ||
| def test_refutation_dummy_outcome_refuter_default_categorical_treatment( | ||
| self, error_tolerence, estimator_method, num_samples | ||
|
||
| ): | ||
| # Regression test for #1316: the categorical branch had a copy-paste error that tried to | ||
| # groupby("bins") which doesn't exist for categorical treatments, raising KeyError. | ||
| refuter_tester = SimpleRefuter(error_tolerence, estimator_method, "dummy_outcome_refuter") | ||
|
||
| refuter_tester.categorical_treatment_testsuite(tests_to_run="atleast-one-common-cause", num_samples=num_samples) | ||
|
emrekiciman marked this conversation as resolved.
|
||
|
|
||
| @mark.parametrize( | ||
| ["error_tolerence", "estimator_method", "transformations"], | ||
| [(0.05, "iv.instrumental_variable", [("zero", ""), ("noise", {"std_dev": 1})])], | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.