dowhy/tests/causal_estimators
drawlinson 65f3031bb1
Replace all occurrences of get Pandas' get_dummies() with skLearn OneHotEncoder (#1135)
* For consistency and avoidance of future issues, replace all occurrences of Pandas' get_dummies with skLearn's OneHotEncoder. Encoder lifespan: Reuses encoders for new estimate_effect() calls, and replaces existing encoders on CausalEstimator.fit(). Additional uses of get_dummies without side-effects or consistent encoding issues in do-Sampler Propensity Scores utilities also replaced for consistency.

Signed-off-by: DAVID RAWLINSON <dave@causalwizard.app>

* Add categorical encoding consistency tests for CausalEstimators. Fix bug in arg order for RegressionEstimator._do().

Signed-off-by: DAVID RAWLINSON <dave@causalwizard.app>

---------

Signed-off-by: DAVID RAWLINSON <dave@causalwizard.app>
Co-authored-by: DAVID RAWLINSON <dave@causalwizard.app>
2024-03-26 22:03:17 +05:30
..
__init__.py added tests for all except RD estimator 2019-01-21 16:02:31 -05:00
base.py Replace all occurrences of get Pandas' get_dummies() with skLearn OneHotEncoder (#1135) 2024-03-26 22:03:17 +05:30
mock_external_estimator.py Fix missing import for unit test 2023-12-11 13:22:53 -08:00
test_causalml_estimator.py Rename classes in test folder 2023-12-11 10:52:07 -08:00
test_econml_estimator.py Rename classes in test folder 2023-12-11 10:52:07 -08:00
test_estimator_consistency.py Replace all occurrences of get Pandas' get_dummies() with skLearn OneHotEncoder (#1135) 2024-03-26 22:03:17 +05:30
test_generalized_linear_model_estimator.py Rename classes in test folder 2023-12-11 10:52:07 -08:00
test_instrumental_variable_estimator.py Rename classes in test folder 2023-12-11 10:52:07 -08:00
test_linear_regression_estimator.py Rename classes in test folder 2023-12-11 10:52:07 -08:00
test_propensity_score_matching_estimator.py Rename classes in test folder 2023-12-11 10:52:07 -08:00
test_propensity_score_stratification_estimator.py Rename classes in test folder 2023-12-11 10:52:07 -08:00
test_propensity_score_weighting_estimator.py Rename classes in test folder 2023-12-11 10:52:07 -08:00
test_regression_discontinuity_estimator.py Rename classes in test folder 2023-12-11 10:52:07 -08:00
test_two_stage_regression_estimator.py Rename classes in test folder 2023-12-11 10:52:07 -08:00