py-why / dowhy

DoWhy is a Python library for causal inference that supports explicit modeling and testing of causal assumptions. DoWhy is based on a unified language for causal inference, combining causal graphical models and potential outcomes frameworks.
https://www.pywhy.org/dowhy
MIT License
6.89k stars 916 forks source link

Fix bug with consistency of RegressionEstimator one-hot encoding #1112

Closed drawlinson closed 6 months ago

drawlinson commented 7 months ago

Fix bug with consistency of RegressionEstimator one-hot encoding by switching from pandas get_dummies to sklearn OneHotEncoder.

See issue https://github.com/py-why/dowhy/issues/1111

bloebp commented 6 months ago

Hi, thanks for addressing this! Can you also add a unit test to cover this?

drawlinson commented 6 months ago

No problem, unit test added. NB Apologies in advance - will not be able to update PR from 14 to 27 Dec, away from computer!