Граф коммитов

1038 Коммитов

Автор SHA1 Сообщение Дата
Patrick Bloebaum c9d9c3a6f0 Revise gcm auto assignment logic
Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
2022-11-07 06:30:27 -08:00
Patrick Bloebaum 2ed7cf4e93 Add polynom regressor and classifier to gcm
This replaces the ProductRegressor.

Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
2022-11-04 10:32:00 -07:00
Patrick Bloebaum fb5b4d5260 Rename gcm bootstrap training to fit_and_compute
Related to issue https://github.com/py-why/dowhy/issues/689

Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
2022-11-02 17:27:34 +01:00
Patrick Bloebaum f749ceebb7 Remove unnecessary double underscores in gcm module
Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
2022-11-02 07:10:12 -07:00
Patrick Bloebaum c988220819 Use concat instead of append for pandas in distribution change
This avoids a future deprecation warning.

Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
2022-11-02 07:10:01 -07:00
Patrick Bloebaum a136ed41bf Fix issue with categorical inputs to gcm ProductRegressor
Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
2022-11-02 07:09:45 -07:00
Peter Goetz 560b3460aa Add 'Typical usage' section in GCM introduction
Signed-off-by: Peter Goetz <pego@amazon.com>
2022-11-02 11:01:42 +01:00
Peter Goetz b43ce50d7c Remove bibtex from GCM introduction
This is covered in docs/source/cite.rst.

Signed-off-by: Peter Goetz <pego@amazon.com>
2022-11-02 11:01:42 +01:00
Chris Trevino f2a4a51a7f
Upgrade xgboost (#739)
upgrade xgboost

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>
2022-11-01 14:02:29 -07:00
Chris Trevino ba89c374ec
Restore Notebook Tests in Regular CI (#728) 2022-11-01 11:44:35 -07:00
Andres Morales 656aa9964f
Merge pull request #730 from py-why/fix/refuter_random_state
Check random_state type on placebo_treatment_refuter Fix #719
2022-11-01 09:25:32 -06:00
Andres Morales 68f5d2b1bc
Merge pull request #732 from py-why/fix/dowhy_functional_api_notebook_data_generation
Set seed on data generation for deterministic test
2022-11-01 09:16:07 -06:00
Andres Morales dcb4d54fd8 Uncomment notebook examples for coverage
Signed-off-by: Andres Morales <andresmor@microsoft.com>
2022-10-31 13:15:50 -06:00
Andres Morales 10bd4ec084 Set seed on data generation for deterministic test
Signed-off-by: Andres Morales <andresmor@microsoft.com>
2022-10-31 12:34:53 -06:00
Chris Trevino b9bab69d73
Use a different github action for notifying discord (#731)
use a different github action for notifying discord

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>
2022-10-31 09:59:13 -07:00
Andres Morales 18bd1fe5d9
Merge pull request #727 from py-why/fix/add_unobserved_common_cause_backwards_compatibility
Re-introduce include_simulated_confounder as method
2022-10-31 10:28:12 -06:00
Andres Morales 6f721e5c1b Check random_state type on placebo_treatment_refuter Fix #719
Signed-off-by: Andres Morales <andresmor@microsoft.com>
2022-10-31 10:13:16 -06:00
Chris Trevino f13ed30f42
Restore some key tests into the regular CI pipeline (#725)
* restore some key notebook tests

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* remove advanced marks from unit tests

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* remove advanced mark from test_validation.py

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* apply formatting

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* update test durations, restore some test notebooks

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* bump the test splits

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* restore main notebook tests, take a more piecemeal approach

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>
2022-10-28 15:46:08 -07:00
Andres Morales d4087d26a8 Add constants name
Signed-off-by: Andres Morales <andresmor@microsoft.com>
2022-10-28 11:58:55 -06:00
Andres Morales 1e3c489ddb Re-introduce include_simulated_confounder as method
Signed-off-by: Andres Morales <andresmor@microsoft.com>
2022-10-28 10:36:45 -06:00
Patrick Bloebaum 0f56449d9f Fix issue with identifying boolean values of dataframes in is_categorical
Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
2022-10-28 09:28:28 -07:00
Peter Goetz 3e8c31b722 Make unit test on intervention less strict
To avoid flaky tests.

Signed-off-by: Peter Goetz <pego@amazon.com>
2022-10-28 15:34:59 +02:00
Patrick Bloebaum 8a4158923f Add independence tests as parameter to distribution change
This removes the option to change the mechanism change test directly. As it turned out, changing the independence test is the more common case.

Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
2022-10-28 05:56:16 -07:00
Andres Morales a18c97eb2e
Merge pull request #717 from py-why/fix/avoid_retrain_estimator
Fix avoid retrain estimator on causal_model API
2022-10-27 15:13:16 -06:00
Chris Trevino 6dc354c075
Fix docs-on-demand Issues (#718)
* fix issues with docs-on-demand GH Actions script

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* update image name

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* restore jupyter notebook from main

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* remove accidentally added file

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>
2022-10-27 13:54:02 -07:00
Patrick Blöbaum 7a7ace2ec0
Make a gcm unit test for drawing from an interventional distribution less flaky (#715)
Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>

Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
2022-10-27 13:43:08 -07:00
Andres Morales 80e32cd4d1 Fix avoid retrain estimator on causal_model API
Signed-off-by: Andres Morales <andresmor@microsoft.com>
2022-10-27 14:42:57 -06:00
Chris Trevino 989e13fb6e
Add pytest markers for "focused" and "notebook" (#716)
add pytest markers for notebook, focused to remove runtime warnings

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>
2022-10-27 13:17:30 -07:00
Patrick Bloebaum b9cfc7f223 Replace HSCI and KCI with causal-learn package functions
The causal-learn package provides more sophisticated implementations of the kernel independence tests. Instead of reimplementing it, we utilize the existing functions from causal-learn instead.

Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
2022-10-27 10:54:07 -07:00
Chris Trevino daf5cfc184
Add econml, pydot extras to Documentation Build (#714)
* add econml, pydot extras to docs build

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* add econml, pydot extras to other build tasks

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* update nightly install

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>
2022-10-27 10:27:38 -07:00
Patrick Bloebaum f020de59d5 Adding causal-learn as (required) dependency
The gcm module will heavily rely on the independence tests in the causal-learn package, i.e., it cannot be optional.

Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
2022-10-27 08:34:59 -07:00
Peter Götz 943d4f6796
Import dowhy.causal_estimators.econml locally (#713)
This imports it within the function where it's used. It removes the hard dependency on EconML and only requires it when using sensitivity_non_parametric_partial_r2.

Signed-off-by: Peter Goetz <pego@amazon.com>

Signed-off-by: Peter Goetz <pego@amazon.com>
2022-10-27 19:39:50 +05:30
Patrick Bloebaum e3f1d9b4a5 Binary bool features now remain binary in one hot encoding for ANMs in gcm
Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
2022-10-27 07:01:12 -07:00
Patrick Bloebaum 38bb7231dc Add an option for auto assignment in distribution change attribution
Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
2022-10-27 07:01:01 -07:00
Peter Goetz 3583160874 Fix GH Actions workflow docs trigger
This needs to point to the correct title.

Signed-off-by: Peter Goetz <pego@amazon.com>
2022-10-26 23:21:44 +02:00
Peter Goetz 3c5cf3a67b Change mechanics of Docker image build and usage
- Introduce a GH Action to build Docker image for docs generation every time the Dockerfile is changed
- Trigger docs generation when a new Docker image was built
- Minor fix in Dockerfile to avoid outdated apt database

Signed-off-by: Peter Goetz <pego@amazon.com>
2022-10-26 23:09:59 +02:00
Chris Trevino 9b7e6a74c4
Mark econml, pydot, and pygraphviz as extras (#701)
* mark econml, pydot, and pygraphviz as extras

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* restore dep order

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>
2022-10-26 12:43:43 -07:00
Peter Goetz dfab70097e Add workflow to mark and close stale issues
Signed-off-by: Peter Goetz <pego@amazon.com>
2022-10-26 20:06:36 +02:00
Patrick Bloebaum 141d1f1f1d Make conditional independence test based on regression less flaky
Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
2022-10-26 07:40:32 -07:00
Patrick Bloebaum f79cd0d0ba Adding ProductRegressor to gcm auto assignment
This model simply takes the product of the inputs.

Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
2022-10-26 06:20:01 -07:00
Andres Morales af30e333ae
fix placebo treatment refuter randint call (#702)
Signed-off-by: Andres Morales <andresmor@microsoft.com>

Signed-off-by: Andres Morales <andresmor@microsoft.com>
2022-10-25 12:00:50 -07:00
Andres Morales 05bfa49dac
Merge pull request #693 from py-why/functional_api/estimate_effect_function
Functional api/estimate effect function
2022-10-25 11:02:02 -06:00
Chris Trevino 2044d216c3
Update README.rst, "using latest dev version" instructions (#696)
* update readme

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* update dev-version text

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* update pip command to use git+https

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* some clean-ups

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* remove some stray text

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* whitespace updates to clean up diff

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* fix tqdm spelling

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* add poetry install docs

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* remove dep list from readme

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* update pyproject.toml link to be in rst format

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>
2022-10-25 09:38:10 -07:00
Emre Kıcıman f945eb36b3 Update dowhy_lalonde_example.ipynb
Added numbering to each of the sections to match the "1. Load the data"

Signed-off-by: Emre Kıcıman <emrek@microsoft.com>
2022-10-24 23:17:04 +02:00
Peter Goetz 0578861299 Load Lalonde dataset natively with Python
This was copied from 5afc9088e9/examples/Lalonde/Lalonde_sample.ipynb?short_path=b1d451f#L94-L99 and uses the information provided on https://users.nber.org/~rdehejia/nswdata2.html

Signed-off-by: Peter Goetz <pego@amazon.com>
2022-10-24 23:17:04 +02:00
Chris Trevino 8eb9374d4f
Fix Documentation Builds (#675)
* update image specification

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* ignore type errors in sphinx build

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* sphinx config update

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* ci: add the ability to run the docs build on demand

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* remove stray char

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* restore error_checks

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* homogenize github action names

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* update notebook refutation call

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* hit other invocation

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* use np.array

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* convert to np array internally

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* revent add_unobserved_common_cause.py

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* use float value for effect_fraction_on_treatment

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* revert sensitivity analysis workbook change

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* revert all docs updates

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

* add discord notifier action to build sequences

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>

Signed-off-by: Chris Trevino <darthtrevino@gmail.com>
2022-10-24 13:16:51 -07:00
Peter Götz 990acca2b3
Fix syntax error in dowhy_ranking_methods notebook (#698)
Signed-off-by: Peter Goetz <pego@amazon.com>

Signed-off-by: Peter Goetz <pego@amazon.com>
2022-10-24 09:21:57 -07:00
Andres Morales d7778b574c Add missing param docs, remove if statement
Signed-off-by: Andres Morales <andresmor@microsoft.com>
2022-10-24 09:38:37 -06:00
Peter Götz 17fe5b5168
Add issue templates (#687)
Signed-off-by: Peter Goetz <pego@amazon.com>

Signed-off-by: Peter Goetz <pego@amazon.com>
2022-10-20 00:17:54 -07:00
Andres Morales 6995e467db method_name to class instance
Signed-off-by: Andres Morales <andresmor@microsoft.com>
2022-10-19 12:01:42 -06:00