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.

MIT License

Downloads
57.2K
Stars
6.9K
Committers
94

Bot releases are visible (Hide)

dowhy - v0.11.1: Bug fixes and improvements Latest Release

Published by amit-sharma 10 months ago

  • New feature allowing users to write equations for the DGP of each node and obtain a causal model back with the mechanisms assigned (#1106 )
  • Convenience function to access fitted estimator instances from CausalModel (#1113 )
  • Bug fixes in Kernel-based independence test and networkx plot function
  • Bug fixes for confidence intervals and regressionestimator
  • Some improvements to CI/CD (auto-check readme on each PR, updated package publishing process, fix for timeout error)

Contributors: @bhatt-priyadutt, @drawlinson, @bloebp, @amit-sharma

  • New functional API is ready for use. Try out the notebook
  • A notebook showing how to use causal-learn graph discovery with DoWhy
  • New notebook demonstrating use of the intrinsic causal influence feature
  • Enhanced compatibility between GCM and CausalModel api
  • Frontdoor identification now supports multiple variables
  • New module for evaluating performance and falsifying assumptions of GCM models
  • GCM auto assignment now returns a summary
  • Extended documentation, revised and simpler README
  • Bug fixes and improvements

A big thank you to all the contributors: @amit-sharma, @bloebp, @kunwuz

dowhy - v0.10.1: Minor fixes to main 0.10 release

Published by amit-sharma about 1 year ago

This is a patch release.

  • Added support for exposing interventional outcomes (@drawlinson)
  • Fixed bugs for pandas 2.0 support (@bloebp) and confidence value for statistical test (@amit-sharma)
  • Additions to invariant nodes in GCM (@bhatt-priyadutt)
  • Fixing release pipeline (@kbattocchi)

Thanks to everyone for contributing issues and fixes for this patch.

dowhy - v0.10: New user guide, causal prediction API, and two more refutations

Published by amit-sharma about 1 year ago

  • Introducing an updated user guide for navigating the world of causality. The user guide is a great resource to learn about the different causal tasks, which ones may be relevant for you, and how to implement them using DoWhy.
  • Causal prediction is the latest task supported by DoWhy! Try out the prediction notebook by @jivatneet
  • A new technique for validating causal graphs. Check out the notebook by @eeulig
  • New refutation: Overrule for learning boolean rules to describe support of the data/overlap between treatment and control groups in the data. Check out the notebook by @moberst
  • Added a new method to estimate intrinsic causal influences for a single sample.
  • Refactor of estimator API that allows separate fit and estimate methods
  • Several optimizations and speed-ups of GCM methods
  • Python 3.11 support and a simpler dependency list

A big thanks to all the contributors. @AlxndrMlk @amit-sharma @andresmor-ms @bloebp @darthtrevino @eeulig @eltociear @emrekiciman @jivatneet @kbattocchi @Klesel @MFreidank @MichaelMarien @moberst @Padarn @petergtz @RoseDeSicilia26 @sgrimbly @vspinu @yoshiakifukushima @Zethson

dowhy - v0.9.1: Python 3.10 support and dependency fixes

Published by amit-sharma almost 2 years ago

Minor update to v0.9.

  • Python 3.10 support
  • Streamlined dependency structure for the dowhy package (fewer required dependencies)
  • Color option for plots (@eeulig)

Thanks @darthtrevino, @petergtz, @andresmor-ms for driving this release!

  • Preview for the new functional API (see notebook). The new API (in experimental stage) allows for a modular use of the different functionalities and includes separate fit and estimate methods for causal estimators. Please leave your feedback here. The old DoWhy API based on CausalModel should work as before. (@andresmor-ms)

  • Faster, better sensitivity analyses.

  • New API for unit change attribution (@kailashbuki)

  • New quality option BEST for auto-assignment of causal mechanisms, which uses the optional auto-ML library AutoGluon (@bloebp)

  • Better conditional independence tests through the causal-learn package (@bloebp)

  • Algorithms for computing efficient backdoor sets [ example notebook ] (@esmucler)

  • Support for estimating controlled direct effect (@amit-sharma)

  • Support for multi-valued treatments for econml estimators (@EgorKraevTransferwise)

  • New PyData theme for documentation with new homepage, Getting started guide, revised User Guide and examples page (@petergtz)

  • A contributing guide and simplified instructions for new contributors (@MichaelMarien)

  • Streamlined dev environment using Poetry for managing dependencies and project builds (@darthtrevino)

  • Bug fixes

dowhy - v0.8: GCM support and partial R2-based sensitivity analysis

Published by amit-sharma over 2 years ago

A big thanks to @petergtz, @kailashbuki, and @bloebp for the GCM package and @anusha0409 for an implementation of partial R2 sensitivity analysis for linear models.

  • Graphical Causal Models: SCMs, root-cause analysis, attribution, what-if analysis, and more.

  • Sensitivity Analysis: Faster, more general partial-R2 based sensitivity analysis for linear models, based on Cinelli & Hazlett (2020).

  • New docs structure: Updated docs structure including user and contributors' guide. Check out the docs.

  • Bug fixes

Contributors: @amit-sharma, @anusha0409, @bloebp, @EgorKraevTransferwise, @EliKling, @kailashbuki, @itsoum, @MichaelMarien, @petergtz, @ryanrussell

dowhy - Graph refuters, support for dagitty, and creating your own estimators

Published by amit-sharma over 2 years ago

  • Graph refuter with conditional independence tests to check whether data conforms to the assumed causal graph

  • Better docs for estimators by adding the method-specific parameters directly in its own init method

  • Support use of custom external estimators

  • Consistent calls for init_params for dowhy and econml estimators

  • Add support for Dagitty graphs

  • Bug fixes for GLM model, causal model with no confounders, and hotel case-study notebook

Thank you @EgorKraevTransferwise, @ae-foster, and @anusha0409 for your contributions!

dowhy - v0.7: Causal discovery, ID identification, and faster backdoor identification

Published by amit-sharma almost 3 years ago

  • [Major] Faster backdoor identification with support for minimal adjustment, maximal adjustment
    or exhaustive search. More test coverage for identification.

  • [Major] Added new functionality of causal discovery [Experimental].
    DoWhy now supports discovery algorithms from external libraries like CDT.
    Example notebook

  • [Major] Implemented ID algorithm for causal identification. [Experimental]

  • Added friendly text-based interpretation for DoWhy's effect estimate.

  • Added a new estimation method, distance matching that relies on a distance
    metrics between inputs.

  • Heuristics to infer default parameters for refuters.

  • Inferring default strata automatically for propensity score stratification.

  • Added support for custom propensity models in propensity-based estimation
    methods.

  • Bug fixes for confidence intervals for linear regression. Better version of
    bootstrap method.

  • Allow effect estimation without need to refit the model for econml estimators

Big thanks to @AndrewC19, @ha2trinh, @siddhanthaldar, and @vojavocni

dowhy - Better refuters for unobserved confounding and placebo treatment

Published by amit-sharma over 3 years ago

  • [Major] Placebo refuter now supports instrumental variable methods
  • [Major] Moved matplotlib to an optional dependency. Can be installed using pip install dowhy[plotting]
  • [Major] A new method for generating unobserved confounder for refutation
  • Dummyoutcomerefuter supports unobserved confounder
  • Update to align with EconML's new API
  • All refuters now support control and treatment values for continuous treatments
  • Better logging configuration

A big thanks to @arshiaarya, @n8sty, @moprescu and @vojavocni for their contributions!

dowhy - Bug fixes update

Published by amit-sharma almost 4 years ago

  • Added an optimized version for identify_effect
  • Fixed a bug for direct and indirect effects computation
  • More test coverage: Notebooks are also under automatic tests
  • updated conditional-effects-notebook to support the latest EconML version
  • EconML metalearners now have the expected behavior: accept both common_causes and effect_modifiers
  • Fixed some bugs in refuter tests
dowhy - Enhanced documentation and support for causal mediation

Published by amit-sharma almost 4 years ago

Installation

  • DoWhy can be installed on Conda now!

Code

  • Support for identification by mediation formula
  • Support for the front-door criterion
  • Linear estimation methods for mediation
  • Generalized backdoor criterion implementation using paths and d-separation
  • Added GLM estimators, including logistic regression
  • New API for interpreting causal models, estimates and refuters. First interpreter by @ErikHambardzumyan visualizes
    how the distribution of confounder changes
  • Friendlier error messages for propensity score stratification estimator when there is not enough data in a bin.
  • Enhancements to the dummy outcome refuter with machine learned components--now can simulate non-zero effects too. Ready for alpha testing

Docs

Community

  • Created a contributors page with guidelines for contributing
  • Added allcontributors bot so that new contributors can added just after their pull requests are merged

A big thanks to @Tanmay-Kulkarni101, @ErikHambardzumyan, @Sid-darthvader for their contributions.

dowhy - Powerful refutations and better support for heterogeneous treatment effects

Published by amit-sharma over 4 years ago

  • 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!

dowhy - CATE estimation and integration with EconML

Published by amit-sharma almost 5 years ago

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!

dowhy - First release

Published by amit-sharma over 5 years ago

This release implements the four steps of causal inference: model, identify, estimate and refute. It also includes a pandas.DataFrame extension for causal inference and the do-sampler.