Skip to content

Commit

Permalink
Bumping up version number and updating docs in prep for release (#143)
Browse files Browse the repository at this point in the history
* added cate estimator to causal estimator and one specific estiamtor for linear regression

* Started with a better error message for estimators that do not support CATE as yet, but then generalized to add error messages for when any specific method is not implemented for an estimator.

* added docstrings for the new functionality

* added a warning if effect modifiers provided are extra from the ones specified before, and fixed a bug for discrete variables

* updated files in prep for release of v0.4
  • Loading branch information
amit-sharma authored May 11, 2020
1 parent 0a50b10 commit fdd506c
Show file tree
Hide file tree
Showing 8 changed files with 86 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ init:
test:
py.test tests
check:
python setup.py checka
python setup.py check
sdist:
python setup.py sdist
jupyter:
Expand Down
52 changes: 43 additions & 9 deletions docs/source/code_repo.rst
Original file line number Diff line number Diff line change
@@ -1,19 +1,53 @@
Code repository & Versions
=================
==========================

DoWhy is hosted on GitHub.

You can browse the code in a html-friendly format `here
<https://github.com/Microsoft/dowhy>`_.

Version 0.2-alpha (WIP)
-----------------------
This version includes breaking changes.

* The CausalModel import is now simpler. `from dowhy import CausalModel`.
* do_why.py is renamed to causal_model.py. This should not change any external
usage.
v0.4-beta: Powerful refutations and better support for heterogeneous treatment effects
--------------------------------------------------------------------------------------

Version 0.1.1-alpha
-------------------
* DummyOutcomeRefuter now includes machine learning functions to increase power of the refutation.
* In addition to generating a random dummy outcome, now you can generate a dummyOutcome that is an arbitrary function of confounders but always independent of treatment, and then test whether the estimated treatment effect is zero. This is inspired by ideas from the T-learner.
* We also provide default machine learning-based methods to estimate such a dummyOutcome based on confounders. Of course, you can specify any custom ML method.

* Added a new BootstrapRefuter that simulates the issue of measurement error with confounders. Rather than a simple bootstrap, you can generate bootstrap samples with noise on the values of the confounders and check how sensitive the estimate is.
* The refuter supports custom selection of the confounders to add noise to.

* All refuters now provide confidence intervals and a significance value.

* Better support for heterogeneous effect libraries like EconML and CausalML
* All CausalML methods can be called directly from DoWhy, in addition to all methods from EconML.
* [Change to naming scheme for estimators] To achieve a consistent naming scheme for estimators, we suggest to prepend internal dowhy estimators with the string "dowhy". For example, "backdoor.dowhy.propensity_score_matching". Not a breaking change, so you can keep using the old naming scheme too.
* EconML-specific: Since EconML assumes that effect modifiers are a subset of confounders, a warning is issued if a user specifies effect modifiers outside of confounders and tries to use EconML methods.

* CI and Standard errors: Added bootstrap-based confidence intervals and standard errors for all methods. For linear regression estimator, also implemented the corresponding parametric forms.

* Convenience functions for getting confidence intervals, standard errors and conditional treatment effects (CATE), that can be called after fitting the estimator if needed

* Better coverage for tests. Also, tests are now seeded with a random seed, so more dependable tests.

Thanks to @Tanmay-Kulkarni101 and @Arshiaarya for their contributions!

v0.2-alpha: CATE estimation and integration with EconML
-------------------------------------------------------


This release includes many major updates:

* (BREAKING CHANGE) The CausalModel import is now simpler: "from dowhy import CausalModel"
* Multivariate treatments are now supported.
* Conditional Average Treatment Effects (CATE) can be estimated for any subset of the data. Includes integration with EconML--any method from EconML can be called using DoWhy through the estimate_effect method (see example notebook).
* Other than CATE, specific target estimands like ATT and ATC are also supported for many of the estimation methods.
* For reproducibility, you can specify a random seed for all refutation methods.
* Multiple bug fixes and updates to the documentation.


Includes contributions from @j-chou, @ktmud, @jrfiedler, @shounak112358, @Lnk2past. Thank you all!

v0.1.1-alpha: First release
---------------------------
This is the first release of the library.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# -- Project information -----------------------------------------------------

project = 'DoWhy | Making Causal Inference Easy'
copyright = '2018, Microsoft'
copyright = '2020, Microsoft'
author = 'Amit Sharma, Emre Kiciman'

# The short X.Y version
Expand Down
22 changes: 19 additions & 3 deletions docs/source/dowhy.causal_estimators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@ dowhy.causal\_estimators package
Submodules
----------

dowhy.causal\_estimators.econml\_cate\_estimator module
-------------------------------------------------------
dowhy.causal\_estimators.causalml module
----------------------------------------

.. automodule:: dowhy.causal_estimators.econml_cate_estimator
.. automodule:: dowhy.causal_estimators.causalml
:members:
:undoc-members:
:show-inheritance:

dowhy.causal\_estimators.econml module
--------------------------------------

.. automodule:: dowhy.causal_estimators.econml
:members:
:undoc-members:
:show-inheritance:
Expand All @@ -28,6 +36,14 @@ dowhy.causal\_estimators.linear\_regression\_estimator module
:undoc-members:
:show-inheritance:

dowhy.causal\_estimators.propensity\_score\_estimator module
------------------------------------------------------------

.. automodule:: dowhy.causal_estimators.propensity_score_estimator
:members:
:undoc-members:
:show-inheritance:

dowhy.causal\_estimators.propensity\_score\_matching\_estimator module
----------------------------------------------------------------------

Expand Down
16 changes: 16 additions & 0 deletions docs/source/dowhy.causal_refuters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ dowhy.causal\_refuters.add\_unobserved\_common\_cause module
:undoc-members:
:show-inheritance:

dowhy.causal\_refuters.bootstrap\_refuter module
------------------------------------------------

.. automodule:: dowhy.causal_refuters.bootstrap_refuter
:members:
:undoc-members:
:show-inheritance:

dowhy.causal\_refuters.data\_subset\_refuter module
---------------------------------------------------

Expand All @@ -20,6 +28,14 @@ dowhy.causal\_refuters.data\_subset\_refuter module
:undoc-members:
:show-inheritance:

dowhy.causal\_refuters.dummy\_outcome\_refuter module
-----------------------------------------------------

.. automodule:: dowhy.causal_refuters.dummy_outcome_refuter
:members:
:undoc-members:
:show-inheritance:

dowhy.causal\_refuters.placebo\_treatment\_refuter module
---------------------------------------------------------

Expand Down
1 change: 1 addition & 0 deletions docs/source/dowhy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Subpackages
-----------

.. toctree::
:maxdepth: 4

dowhy.api
dowhy.causal_estimators
Expand Down
2 changes: 1 addition & 1 deletion dowhy/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2
0.4
10 changes: 4 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,19 @@
license='MIT',
long_description=long_description,
url='https://github.com/microsoft/dowhy', # Optional
download_url='https://github.com/microsoft/dowhy/archive/v0.2.tar.gz',
download_url='https://github.com/microsoft/dowhy/archive/v0.4.tar.gz',
author='Amit Sharma, Emre Kiciman',
classifiers=[ # Optional
'Development Status :: 3 - Alpha',
'Development Status :: 4 - Beta',
'License :: OSI Approved :: MIT License',

'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
],

keywords='causality machine-learning causal-inference statistics graphical-model',
packages=find_packages(exclude=['docs', 'tests']),
python_requires='>=3.4',
python_requires='>=3.5',
install_requires=install_requires,
include_package_data=True,
package_data={'dowhy':['VERSION']}
Expand Down

0 comments on commit fdd506c

Please sign in to comment.