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

1038 Коммитов

Автор SHA1 Сообщение Дата
Rahul Shrestha 4c3a08322d
Fix incorrect edges in `adjacency_matrix_to_graph` (#1202)
* Fix matrix bug

Signed-off-by: rahulbshrestha <rahulshrestha0101@gmail.com>

* Fixed graphviz import

Signed-off-by: rahulbshrestha <rahulshrestha0101@gmail.com>

---------

Signed-off-by: rahulbshrestha <rahulshrestha0101@gmail.com>
2024-08-04 10:35:42 +05:30
Rahul Shrestha daf5f947f9
Add examples from "Causal Inference and Discovery in Python" to tests (#1165)
* Add test file

Signed-off-by: Rahul Shrestha <rahulshrestha0101@gmail.com>

added chapter 6

Fix

Signed-off-by: Rahul Shrestha <rahulshrestha0101@gmail.com>

Add chapter 8

Signed-off-by: Rahul Shrestha <rahulshrestha0101@gmail.com>

Fix formatting issue with linter

Add references

* Added reference message

Signed-off-by: rahulbshrestha <rahulshrestha0101@gmail.com>

* Added econml requirement

Signed-off-by: rahulbshrestha <rahulshrestha0101@gmail.com>

* removed econml from imports

Signed-off-by: Amit Sharma <amit_sharma@live.com>

---------

Signed-off-by: rahulbshrestha <rahulshrestha0101@gmail.com>
Signed-off-by: Amit Sharma <amit_sharma@live.com>
Co-authored-by: Amit Sharma <amit_sharma@live.com>
2024-08-04 10:07:55 +05:30
Ashutosh Srivastava becbf7f502
Effect estimation over timeseries data (#1218)
* Library functions for temporal causal functionality

* shifting plotter function

* printing graph: best practices

* added docstrings

* moved datasets

* updated tutorial notebook

* sphinx documentation

* updated shifting columns with 0,1,..,max_lag

* support for dot format

* tigramite support

* updated filter to be a hidden function

* black and isort utils

* black and isort timeseries

* updated notebook text

Signed-off-by: Amit Sharma <amit_sharma@live.com>

* integer range fix

* correction in timestamp : notebook text

* time lagged causal estimation

* removed cell outputs

* find ancestors

* include ancestors in notebook

* formatting changes

* comments : notebook

* multiple time lags : csv graph'

* multiple time lags

* unrolled graph using bfs

* cleanup of functions

* removed find parents and ancestors

* tests for causal graph creation

* tests for adding lagged edges

* tests for shifting columns


* tigramite dependency added

---------

Signed-off-by: Amit Sharma <amit_sharma@live.com>
Co-authored-by: Amit Sharma <amit_sharma@live.com>
2024-08-03 22:54:02 +05:30
Patrick Bloebaum e783e37db0 Update paper references
Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
2024-07-30 07:30:27 -07:00
Chris Trevino a20909499b
Update docsite publish steps (#1235)
* limit doc pubilcation

---------

Signed-off-by: Chris Trevino <chtrevin@microsoft.com>
2024-07-30 07:27:50 -07:00
Chris Trevino 232e123dfa
list out docsite contents pre-publish (#1234)
Signed-off-by: Chris Trevino <chtrevin@microsoft.com>
2024-07-29 16:43:58 -07:00
kmhj13 bdaf04d808
Counterfactual fairness (#1203)
Add example notebook for counterfactual fairness using GCM

Following the paper Estimates Counterfactual Fairness following Kusner et al. (2018)

---------

Signed-off-by: Kriti Mahajan <kritimhj@amazon.com>
2024-07-29 08:55:12 -07:00
Patrick Bloebaum 35408a1e94 Change OneHotEncoder parameter from "sparse" to "sparse_output"
The "sparse" parameter is deprecated and was renamed to "sparse_output".

Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
2024-07-29 08:51:36 -07:00
Patrick Bloebaum 6a9a229bb5 Change default parameters for Shapley estimator
This should significantly speed up some calculations for larger graphs. In this regard, also increased the default samples for the anomaly attribution to balance the reduced number of Shapley run.

Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
2024-07-29 08:51:20 -07:00
Patrick Bloebaum 9b9d6093fb Change default parameters of ICC for speedup
Taking less samples to estimate ICC. This might lead to higher variance in the estimate, but speeds it up by multiple factors.

Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
2024-07-29 08:51:06 -07:00
Patrick Bloebaum 474c5844ec Remove existing causal mechanisms when creating GCM
Before, when a causal graph had causal mechanisms assigned, they were also used when creating a new GCM object based on it. Now, they are removed (from a copied version of the graph).

Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
2024-07-29 08:50:52 -07:00
Patrick Bloebaum 57fd684450 Add new method to merge p-values using FDR
The method merges p-values by taking the minimum of the adjusted p-values. This then represents a p-value for a global hypothesis.

Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
2024-07-29 08:50:34 -07:00
dependabot[bot] cb82358aba
Bump setuptools from 69.0.2 to 70.0.0 (#1226)
Bumps [setuptools](https://github.com/pypa/setuptools) from 69.0.2 to 70.0.0.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst)
- [Commits](https://github.com/pypa/setuptools/compare/v69.0.2...v70.0.0)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-23 22:31:43 +05:30
dependabot[bot] 74843525f9
Bump zipp from 3.17.0 to 3.19.1 (#1225)
Bumps [zipp](https://github.com/jaraco/zipp) from 3.17.0 to 3.19.1.
- [Release notes](https://github.com/jaraco/zipp/releases)
- [Changelog](https://github.com/jaraco/zipp/blob/main/NEWS.rst)
- [Commits](https://github.com/jaraco/zipp/compare/v3.17.0...v3.19.1)

---
updated-dependencies:
- dependency-name: zipp
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-10 00:03:20 -07:00
dependabot[bot] 8fa250e38a
Bump certifi from 2023.11.17 to 2024.7.4 (#1224)
Bumps [certifi](https://github.com/certifi/python-certifi) from 2023.11.17 to 2024.7.4.
- [Commits](https://github.com/certifi/python-certifi/compare/2023.11.17...2024.07.04)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-08 00:06:35 -07:00
yogabonito c596b1ff2f docs: small fix in user guide
Signed-off-by: yogabonito <yogabonito@users.noreply.github.com>
2024-07-01 08:27:04 -07:00
dependabot[bot] 0fa9a2e15c Bump ws from 8.11.0 to 8.17.1 in /docs/version_patcher
Bumps [ws](https://github.com/websockets/ws) from 8.11.0 to 8.17.1.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.11.0...8.17.1)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-17 18:22:07 -07:00
dependabot[bot] 7192f0eb87 Bump urllib3 from 2.1.0 to 2.2.2
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.1.0 to 2.2.2.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/2.1.0...2.2.2)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-17 18:21:47 -07:00
dependabot[bot] 512d1b0ff1 Bump tornado from 6.4 to 6.4.1
Bumps [tornado](https://github.com/tornadoweb/tornado) from 6.4 to 6.4.1.
- [Changelog](https://github.com/tornadoweb/tornado/blob/master/docs/releases.rst)
- [Commits](https://github.com/tornadoweb/tornado/compare/v6.4.0...v6.4.1)

---
updated-dependencies:
- dependency-name: tornado
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-14 07:14:59 -07:00
allcontributors[bot] 7c867f8465
docs: add yogabonito as a contributor for doc (#1205)
* docs: update CONTRIBUTING.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2024-06-13 13:06:48 +05:30
yogabonito 6f4ff22353
[DOC] fix typo (#1204)
* [DOC] fix typo

Signed-off-by: yogabonito <yogabonito@users.noreply.github.com>

* [DOC] small fix

The text first informs that PC, FCI, and GES will be considered, but instead of FCI the notebook shows LiNGAM.

Signed-off-by: yogabonito <yogabonito@users.noreply.github.com>

---------

Signed-off-by: yogabonito <yogabonito@users.noreply.github.com>
2024-06-13 13:06:19 +05:30
Jon Cowie ec9ffca5ba Fix typos, 'Falsificaton' -> 'Falsification'
Signed-off-by: Jon Cowie <jonlives@gmail.com>
2024-06-05 08:43:43 -07:00
Patrick Bloebaum fa1e7fcedb Add RankBasedAnomalyScorer as an anomaly scorer
This is very closely related to the RescaledMedianCDFQuantileScorer but a statistically more well-defined approach. However, it is also slightly more conservative for small sample sizes.
Furthermore, it changes the way equal samples are counted in MedianCDFQuantileScorer by also including the test sample itself. This prevents a p-value of 0.

Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
2024-06-04 08:11:40 -07:00
allcontributors[bot] e483c8bb67
docs: add rahulbshrestha as a contributor for code (#1195)
* docs: update CONTRIBUTING.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2024-06-04 15:51:12 +05:30
Rahul Shrestha 72e3ba055e
Vectorize operations for propensity score matching (#1179)
* Add vector operations

Added todo comment

Signed-off-by: Rahul Shrestha <rahulshrestha0101@gmail.com>

formatting fix

Signed-off-by: Rahul Shrestha <rahulshrestha0101@gmail.com>

bug fix with string name

Signed-off-by: rahulbshrestha <rahulshrestha0101@gmail.com>

* Vectorize remaining list

Signed-off-by: rahulbshrestha <rahulshrestha0101@gmail.com>

---------

Signed-off-by: rahulbshrestha <rahulshrestha0101@gmail.com>
2024-06-04 15:50:40 +05:30
Patrick Blöbaum 5d8fdd0992
Add a modified version of the auto MPG dataset (#1190)
Before, we were loading it directly from the UCI dataset repository. However, this cause connection issues and build fails. The dataset is now added directly with its respective license.

Further, removed the output of the causal discovery example notebook to ensure that it gets compiled while building.

Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
2024-06-04 15:36:59 +05:30
Patrick Bloebaum 62ea326372 Replacing numpy repmat with tile
NumPy matlib has been deprecated. Replacing the usage accordingly.

Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
2024-05-29 08:31:32 -07:00
Patrick Bloebaum 38aee63904 Small correction of average p-value merger
Before, a single p-value still got adjusted using the 2 * ... formula, which led to an unnecessary adjustment.

Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
2024-05-29 08:31:18 -07:00
Christoph ff068cc497
Update dowhy_causal_discovery_example.ipynb (#1186)
fix variable name for sachs data set

Signed-off-by: Christoph <krz@users.noreply.github.com>
2024-05-22 11:28:12 -07:00
allcontributors[bot] 1cef2ac070
docs: add victor5as as a contributor for code (#1189)
* docs: update CONTRIBUTING.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2024-05-21 10:54:26 -07:00
Víctor Quintas-Martínez 63dea3356e
Code for Multiply-Robust Causal Change Attribution (#1183)
Add distribution_change_robust method

Adding a new distribution change method that more robust and converges faster. However, it does not support all kind of set functions. Currently, it supports mean and variance attributions.

Based on the paper:

Quintas-Martinez, V., Bahadori, M. T., Santiago, E., Mu, J., Janzing, D., and Heckerman, D. Multiply-Robust Causal Change Attribution, Proceedings of the 41st International Conference on Machine Learning, Vienna, Austria. PMLR 235, 2024.

Signed-off-by: Víctor Quintas-Martínez <vquintas@mit.edu>
2024-05-21 10:35:35 -07:00
dependabot[bot] 3660325a18
Bump requests from 2.31.0 to 2.32.0 (#1187)
---
updated-dependencies:
- dependency-name: requests
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 07:31:24 -07:00
Harsh Sinha d2962dd186
Modify graphviz installation command (#1178)
Modify graphviz installation command in README.rst, contributing-code.rst, and install.rst. Solves https://github.com/py-why/dowhy/issues/1172

Signed-off-by: Harsh Sinha <harsh.sinha@pitt.edu>
2024-05-15 08:28:11 -07:00
dependabot[bot] 333c9a8afa
Bump werkzeug from 3.0.1 to 3.0.3 (#1174)
Bumps [werkzeug](https://github.com/pallets/werkzeug) from 3.0.1 to 3.0.3.
- [Release notes](https://github.com/pallets/werkzeug/releases)
- [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/werkzeug/compare/3.0.1...3.0.3)

---
updated-dependencies:
- dependency-name: werkzeug
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 18:34:51 -07:00
dependabot[bot] c7a3681a9c
Bump jinja2 from 3.1.3 to 3.1.4 (#1175)
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.3...3.1.4)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 18:33:33 -07:00
dependabot[bot] 35ae6aaabe
Bump tqdm from 4.66.1 to 4.66.3 (#1173)
Bumps [tqdm](https://github.com/tqdm/tqdm) from 4.66.1 to 4.66.3.
- [Release notes](https://github.com/tqdm/tqdm/releases)
- [Commits](https://github.com/tqdm/tqdm/compare/v4.66.1...v4.66.3)

---
updated-dependencies:
- dependency-name: tqdm
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-04 22:15:17 +05:30
Lukas Heumos 517a9eb587
Use numpy tile instead of matrix (#1170)
Signed-off-by: zethson <lukas.heumos@posteo.net>
2024-05-04 22:14:39 +05:30
Rahul Shrestha a65d3d5c56 model name change
Signed-off-by: Rahul Shrestha <rahulshrestha0101@gmail.com>
2024-05-03 12:35:01 -07:00
allcontributors[bot] 2cd8e8147b
docs: add dw-610 as a contributor for code (#1166)
* docs: update CONTRIBUTING.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2024-04-22 21:37:14 +05:30
dependabot[bot] 7aa5b2bdce
Bump aiohttp from 3.9.2 to 3.9.4 (#1162)
Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.9.2 to 3.9.4.
- [Release notes](https://github.com/aio-libs/aiohttp/releases)
- [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst)
- [Commits](https://github.com/aio-libs/aiohttp/compare/v3.9.2...v3.9.4)

---
updated-dependencies:
- dependency-name: aiohttp
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-18 23:18:38 -07:00
Amit Sharma 2c4734867c updated formatting
Signed-off-by: Amit Sharma <amit_sharma@live.com>
2024-04-15 07:01:10 -07:00
Amit Sharma 100a65cf89 fixed argument calling bug
Signed-off-by: Amit Sharma <amit_sharma@live.com>
2024-04-15 07:01:10 -07:00
Patrick Bloebaum f0ca30925e Add new statistical method to merge p-values
This uses an improved version of the "twice the average" rule following recent results from M. Gasparini, R. Wang, and A. Ramdas, *Combining exchangeable p-values*, arXiv 2404.03484, 2024.

This new method is now used by default when merging p-values. Accordingly, the quantile based method was renamed to be more consistent with the naming pattern.

Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
2024-04-15 06:58:38 -07:00
dependabot[bot] c6c11933b6 Bump peaceiris/actions-gh-pages from 3 to 4
Bumps [peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages) from 3 to 4.
- [Release notes](https://github.com/peaceiris/actions-gh-pages/releases)
- [Changelog](https://github.com/peaceiris/actions-gh-pages/blob/main/CHANGELOG.md)
- [Commits](https://github.com/peaceiris/actions-gh-pages/compare/v3...v4)

---
updated-dependencies:
- dependency-name: peaceiris/actions-gh-pages
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-15 06:57:44 -07:00
dependabot[bot] d33a22ff66 Bump idna from 3.6 to 3.7
Bumps [idna](https://github.com/kjd/idna) from 3.6 to 3.7.
- [Release notes](https://github.com/kjd/idna/releases)
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst)
- [Commits](https://github.com/kjd/idna/compare/v3.6...v3.7)

---
updated-dependencies:
- dependency-name: idna
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-12 08:09:27 -07:00
Patrick Bloebaum bbf4c9b195 Adjust format based on new formatter version
The new black formatter version (24.3.0) requires new changes, which are addressed in this commit.

Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
2024-04-12 08:07:21 -07:00
yogabonito 74e51c37d8
[DOC] tiny improvements (#1152)
Signed-off-by: yogabonito <yogabonito@users.noreply.github.com>
2024-04-07 01:31:21 -07:00
dependabot[bot] eb2396756e
Bump pillow from 10.2.0 to 10.3.0 (#1154)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.2.0 to 10.3.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/10.2.0...10.3.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-07 01:30:25 -07:00
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
Hongyu Lin dfbbbca369
Fix small typo in user guide (#1129)
Signed-off-by: Hongyu Lin <67950264+hon-gyu@users.noreply.github.com>
2024-02-09 01:43:21 -08:00