repo_name
stringlengths
8
38
pr_number
int64
3
47.1k
pr_title
stringlengths
8
175
pr_description
stringlengths
2
19.8k
author
null
date_created
stringlengths
25
25
date_merged
stringlengths
25
25
filepath
stringlengths
6
136
before_content
stringlengths
54
884k
after_content
stringlengths
56
884k
pr_author
stringlengths
3
21
previous_commit
stringlengths
40
40
pr_commit
stringlengths
40
40
comment
stringlengths
2
25.4k
comment_author
stringlengths
3
29
__index_level_0__
int64
0
5.1k
airbnb/knowledge-repo
767
[KP] support more sort by & UI improvement
Description of changeset: as title Test Plan: local dev ![image](https://user-images.githubusercontent.com/64947033/224917135-549707a4-2cba-4294-8ed6-24c4d083fa98.png) Reviewers:
null
2023-03-14 06:42:17+00:00
2023-03-19 03:03:33+00:00
knowledge_repo/app/templates/index-base.html
{% extends "base.html" %} {% macro format_authors(authors) %} {% for author in authors %} <a href='/feed?authors={{ author.identifier|urlencode }}'> {{ author.format_name }} </a> {% if not loop.last %} , {% endif %} {% endfor %} {% endmacro %} {% macro pagination(max_pages=20, extremes...
{% extends "base.html" %} {% macro format_authors(authors) %} {% for author in authors %} <a href='/feed?authors={{ author.identifier|urlencode }}'> {{ author.format_name }} </a> {% if not loop.last %} , {% endif %} {% endfor %} {% endmacro %} {% macro pagination(max_pages=20, extremes=True, autohide=True) %} {% if...
mengting1010
9a3fac2c2e8cdd295b53fe38a446d535e4f2bcb5
0d7aba9ddd3336f00f42000a5c2f17ad76ef570d
The above code and some code below will be uncommented in the next PR
mengting1010
0
airbnb/knowledge-repo
735
[kp] fix md data error and ipynb upload
Description of changeset: fix md data error and ipynb upload Test Plan: [x] local test Reviewers: @csharplus @mengting1010
null
2023-01-29 09:14:49+00:00
2023-02-02 07:41:26+00:00
knowledge_repo/app/routes/editor.py
from .. import permissions from ..index import update_index from ..models import Comment, PageView, Post, PostAuthorAssoc from ..proxies import current_repo, current_user, db_session, s3_client, notion_client from ..utils.emails import ( send_review_email, send_reviewer_request_email, ) from ..utils.image impor...
from .. import permissions from ..index import update_index from ..models import Comment, PageView, Post, PostAuthorAssoc from ..proxies import current_repo, current_user, db_session, s3_client, notion_client from ..utils.emails import ( send_review_email, send_reviewer_request_email, ) from ..utils.image impor...
JJJ000
43635f53c93ceb0f1568c9fdda796e88a80bb2d0
1070404b926ac5f1e1c27a246d4fac95d3cd3518
Use `os.path.join()` as explained in: https://www.geeksforgeeks.org/python-os-path-join-method/ ?
csharplus
1
airbnb/knowledge-repo
725
update notion db id
Description of changeset: as title Test Plan: local dev Reviewers: @csharplus @JJJ000
null
2023-01-20 01:59:00+00:00
2023-01-21 19:36:20+00:00
knowledge_repo/utils/notion.py
from notion_client import Client, AsyncClient import logging from notion_client import APIResponseError from knowledge_repo.constants import KP_EDIT_PROD_LINK logger = logging.getLogger(__name__) def get_notion_client(auth): """Get a notion synchronous client for notion synchronous operations :param auth: B...
from notion_client import Client, AsyncClient import logging from notion_client import APIResponseError from knowledge_repo.constants import KP_EDIT_PROD_LINK logger = logging.getLogger(__name__) def get_notion_client(auth): """Get a notion synchronous client for notion synchronous operations :param auth: B...
mengting1010
582fc923aff96253440a15de493f950f8195cca6
58155530b5fe639d54f6797cd6e8b55ac4a753fe
we probably need to add it to config
JJJ000
2
airbnb/knowledge-repo
725
update notion db id
Description of changeset: as title Test Plan: local dev Reviewers: @csharplus @JJJ000
null
2023-01-20 01:59:00+00:00
2023-01-21 19:36:20+00:00
knowledge_repo/utils/notion.py
from notion_client import Client, AsyncClient import logging from notion_client import APIResponseError from knowledge_repo.constants import KP_EDIT_PROD_LINK logger = logging.getLogger(__name__) def get_notion_client(auth): """Get a notion synchronous client for notion synchronous operations :param auth: B...
from notion_client import Client, AsyncClient import logging from notion_client import APIResponseError from knowledge_repo.constants import KP_EDIT_PROD_LINK logger = logging.getLogger(__name__) def get_notion_client(auth): """Get a notion synchronous client for notion synchronous operations :param auth: B...
mengting1010
582fc923aff96253440a15de493f950f8195cca6
58155530b5fe639d54f6797cd6e8b55ac4a753fe
Updated, PTAL again. Thanks!
mengting1010
3
airbnb/knowledge-repo
706
[kp] update s3 repo
Description of changeset: update s3 repo Test Plan: [x] CI Reviewers: @csharplus @mengting1010
null
2023-01-02 01:35:26+00:00
2023-01-06 03:37:10+00:00
requirements.txt
boto3==1.26.37 botocore==1.29.37 cooked_input flask==2.1.2 Flask-Migrate gitdb gitpython==3.1.30 tabulate==0.8.9 pyyaml markdown==3.3.4 pygments==2.10.0 pyyaml flask_login==0.6.1 flask_principal flask_mail gunicorn inflection pillow psycopg2 nbformat nbconvert[execute] traitlets ldap3 requests requests_oauthl...
boto3==1.26.37 botocore==1.29.37 cooked_input flask==2.1.2 Flask-Migrate gitdb gitpython==3.1.30 tabulate==0.8.9 pyyaml markdown==3.3.4 pygments==2.10.0 pyyaml flask_login==0.6.1 flask_principal flask_mail gunicorn inflection pillow psycopg2 nbformat nbconvert[execute] traitlets ldap3 requests requests_oauthl...
JJJ000
c255ede148aef3f804a293972a21b9d7b2419326
00d51151f35a0dccf7dae17812331fdc0065f1ca
Please lock the version of the new library to avoid unexpected breaks when the library updates in the future.
csharplus
4
airbnb/knowledge-repo
704
Add Notion Integration
Description of changeset: as title. Test Plan: local dev Reviewers:
null
2022-12-31 20:38:03+00:00
2023-01-11 04:00:33+00:00
requirements.txt
boto3==1.26.37 botocore==1.29.37 cooked_input flask==2.1.2 Flask-Migrate gitdb gitpython==3.1.30 tabulate==0.8.9 pyyaml markdown==3.3.4 pygments==2.10.0 pyyaml flask_login==0.6.1 flask_principal flask_mail gunicorn inflection pillow psycopg2 nbformat nbconvert[execute] traitlets ldap3 requests requests_oauthl...
boto3==1.26.37 botocore==1.29.37 cooked_input flask==2.1.2 Flask-Migrate gitdb gitpython==3.1.30 tabulate==0.8.9 pyyaml markdown==3.3.4 pygments==2.10.0 pyyaml flask_login==0.6.1 flask_principal flask_mail gunicorn inflection pillow psycopg2 nbformat nbconvert[execute] traitlets ldap3 requests requests_oauthl...
mengting1010
a875df6b4cc47024d8b3133776c7c6e8213f9daa
1ad529a84dcf923fdde97a3b7e804936f1d14007
Please add the current version number of `notion-client` as well to avoid future break changes from this library.
csharplus
5
airbnb/knowledge-repo
698
Update Jupyter Notebook Upload Related
Description of changeset: - Integrate with S3 client - upload Jupyter Notebook to s3 when saving the post - export a html version of Jupyter Notebook and upload to s3 Test Plan: local dev Reviewers: @csharplus @JJJ000
null
2022-12-28 23:02:53+00:00
2022-12-29 07:10:50+00:00
knowledge_repo/app/routes/editor.py
from .. import permissions from ..index import update_index from ..models import Comment, PageView, Post, PostAuthorAssoc from ..proxies import current_repo, current_user, db_session from ..utils.emails import ( send_review_email, send_reviewer_request_email, ) from ..utils.image import ( is_allowed_image_f...
from .. import permissions from ..index import update_index from ..models import Comment, PageView, Post, PostAuthorAssoc from ..proxies import current_repo, current_user, db_session from ..utils.emails import ( send_review_email, send_reviewer_request_email, ) from ..utils.image import ( is_allowed_image_f...
mengting1010
451577868d66570a463260c67dff7034214beafd
6edad5351bf3f4f0abc457b6d9532ca25c62c952
You got Lint error in CI: ``` knowledge_repo/app/routes/editor.py:198:57: E502 the backslash is redundant between brackets Error: Process completed with exit code 1. ```
csharplus
6
airbnb/knowledge-repo
698
Update Jupyter Notebook Upload Related
Description of changeset: - Integrate with S3 client - upload Jupyter Notebook to s3 when saving the post - export a html version of Jupyter Notebook and upload to s3 Test Plan: local dev Reviewers: @csharplus @JJJ000
null
2022-12-28 23:02:53+00:00
2022-12-29 07:10:50+00:00
knowledge_repo/app/routes/editor.py
from .. import permissions from ..index import update_index from ..models import Comment, PageView, Post, PostAuthorAssoc from ..proxies import current_repo, current_user, db_session from ..utils.emails import ( send_review_email, send_reviewer_request_email, ) from ..utils.image import ( is_allowed_image_f...
from .. import permissions from ..index import update_index from ..models import Comment, PageView, Post, PostAuthorAssoc from ..proxies import current_repo, current_user, db_session from ..utils.emails import ( send_review_email, send_reviewer_request_email, ) from ..utils.image import ( is_allowed_image_f...
mengting1010
451577868d66570a463260c67dff7034214beafd
6edad5351bf3f4f0abc457b6d9532ca25c62c952
Same lint issue here.
csharplus
7
airbnb/knowledge-repo
698
Update Jupyter Notebook Upload Related
Description of changeset: - Integrate with S3 client - upload Jupyter Notebook to s3 when saving the post - export a html version of Jupyter Notebook and upload to s3 Test Plan: local dev Reviewers: @csharplus @JJJ000
null
2022-12-28 23:02:53+00:00
2022-12-29 07:10:50+00:00
knowledge_repo/app/routes/editor.py
from .. import permissions from ..index import update_index from ..models import Comment, PageView, Post, PostAuthorAssoc from ..proxies import current_repo, current_user, db_session from ..utils.emails import ( send_review_email, send_reviewer_request_email, ) from ..utils.image import ( is_allowed_image_f...
from .. import permissions from ..index import update_index from ..models import Comment, PageView, Post, PostAuthorAssoc from ..proxies import current_repo, current_user, db_session from ..utils.emails import ( send_review_email, send_reviewer_request_email, ) from ..utils.image import ( is_allowed_image_f...
mengting1010
451577868d66570a463260c67dff7034214beafd
6edad5351bf3f4f0abc457b6d9532ca25c62c952
Same lint issue here.
csharplus
8
airbnb/knowledge-repo
697
Enable Jupyter Notebook Upload Post Editor
Description of changeset: - Enable jupyter notebook upload post editor ![image](https://user-images.githubusercontent.com/64947033/209613316-41bf9581-2f77-4dc4-8f79-afb17f578269.png) - This pr only enables the ability to upload and render a html version of jupyter notebook (if it is a ipynb file, s3 will download t...
null
2022-12-27 04:44:23+00:00
2022-12-27 20:24:27+00:00
docker/config.py
from datetime import timedelta # --------------------------------------------------- # Host configuration # --------------------------------------------------- # The server name is used by Flask to limit access to the # served content to request to a particular domain. It # is also used by some authentication provide...
from datetime import timedelta # --------------------------------------------------- # Host configuration # --------------------------------------------------- # The server name is used by Flask to limit access to the # served content to request to a particular domain. It # is also used by some authentication provide...
mengting1010
b15c759e7d17b6a52c502b8bfdc174181da83789
451577868d66570a463260c67dff7034214beafd
this could cause security issue, you might need to remove it from your commit.
JJJ000
9
airbnb/knowledge-repo
697
Enable Jupyter Notebook Upload Post Editor
Description of changeset: - Enable jupyter notebook upload post editor ![image](https://user-images.githubusercontent.com/64947033/209613316-41bf9581-2f77-4dc4-8f79-afb17f578269.png) - This pr only enables the ability to upload and render a html version of jupyter notebook (if it is a ipynb file, s3 will download t...
null
2022-12-27 04:44:23+00:00
2022-12-27 20:24:27+00:00
docker/config.py
from datetime import timedelta # --------------------------------------------------- # Host configuration # --------------------------------------------------- # The server name is used by Flask to limit access to the # served content to request to a particular domain. It # is also used by some authentication provide...
from datetime import timedelta # --------------------------------------------------- # Host configuration # --------------------------------------------------- # The server name is used by Flask to limit access to the # served content to request to a particular domain. It # is also used by some authentication provide...
mengting1010
b15c759e7d17b6a52c502b8bfdc174181da83789
451577868d66570a463260c67dff7034214beafd
I add this file in gitignore, somehow it does not works looks like.
JJJ000
10
airbnb/knowledge-repo
697
Enable Jupyter Notebook Upload Post Editor
Description of changeset: - Enable jupyter notebook upload post editor ![image](https://user-images.githubusercontent.com/64947033/209613316-41bf9581-2f77-4dc4-8f79-afb17f578269.png) - This pr only enables the ability to upload and render a html version of jupyter notebook (if it is a ipynb file, s3 will download t...
null
2022-12-27 04:44:23+00:00
2022-12-27 20:24:27+00:00
docker/config.py
from datetime import timedelta # --------------------------------------------------- # Host configuration # --------------------------------------------------- # The server name is used by Flask to limit access to the # served content to request to a particular domain. It # is also used by some authentication provide...
from datetime import timedelta # --------------------------------------------------- # Host configuration # --------------------------------------------------- # The server name is used by Flask to limit access to the # served content to request to a particular domain. It # is also used by some authentication provide...
mengting1010
b15c759e7d17b6a52c502b8bfdc174181da83789
451577868d66570a463260c67dff7034214beafd
removed
mengting1010
11
airbnb/knowledge-repo
673
fix index and db bugs
Description of changeset: 1. index_failure when service start 2. PostgreSQL close unexpectedly the connection issue Test Plan: local build @csharplus
null
2022-06-12 16:39:05+00:00
2022-06-13 05:23:21+00:00
requirements.txt
cooked_input flask Flask-Migrate gitdb gitpython==3.1.18 tabulate==0.8.9 pyyaml markdown==3.3.4 pygments==2.10.0 pyyaml flask_login flask_principal flask_mail gunicorn inflection pillow nbformat nbconvert[execute] traitlets ldap3 requests weasyprint jinja2>=2.7,<=3.0.3 werkzeug>=1.0,<=2.0.3
cooked_input flask Flask-Migrate gitdb gitpython==3.1.18 tabulate==0.8.9 pyyaml markdown==3.3.4 pygments==2.10.0 pyyaml flask_login flask_principal flask_mail gunicorn inflection pillow nbformat nbconvert[execute] traitlets ldap3 requests weasyprint jinja2>=2.7,<=3.0.3 werkzeug>=1.0,<=2.0.3 multiprocess
JJJ000
5dfd384612a54adf846cc1e81cc09690f1f942a6
f08ced24fda6cee63874b0921869d8405e894358
Is this the correct library name? I searched for it and could not find it. I found the following instead: https://pypi.org/project/multiprocess/
csharplus
12
airbnb/knowledge-repo
673
fix index and db bugs
Description of changeset: 1. index_failure when service start 2. PostgreSQL close unexpectedly the connection issue Test Plan: local build @csharplus
null
2022-06-12 16:39:05+00:00
2022-06-13 05:23:21+00:00
requirements.txt
cooked_input flask Flask-Migrate gitdb gitpython==3.1.18 tabulate==0.8.9 pyyaml markdown==3.3.4 pygments==2.10.0 pyyaml flask_login flask_principal flask_mail gunicorn inflection pillow nbformat nbconvert[execute] traitlets ldap3 requests weasyprint jinja2>=2.7,<=3.0.3 werkzeug>=1.0,<=2.0.3
cooked_input flask Flask-Migrate gitdb gitpython==3.1.18 tabulate==0.8.9 pyyaml markdown==3.3.4 pygments==2.10.0 pyyaml flask_login flask_principal flask_mail gunicorn inflection pillow nbformat nbconvert[execute] traitlets ldap3 requests weasyprint jinja2>=2.7,<=3.0.3 werkzeug>=1.0,<=2.0.3 multiprocess
JJJ000
5dfd384612a54adf846cc1e81cc09690f1f942a6
f08ced24fda6cee63874b0921869d8405e894358
@csharplus yeah, you are right, I past the wrong package name
JJJ000
13
airbnb/knowledge-repo
669
fix package dependency to support local server
Description of changeset: fix package dependency to support local server Test Plan: [x]ci @csharplus
null
2022-05-23 06:36:29+00:00
2022-05-25 02:29:21+00:00
docker/Dockerfile
FROM ubuntu:18.04 LABEL description="knowledge-repo service" # Define some build time variables ARG PIP=pip3 ARG VERSION=0.9.1 # Install required tools and libraries RUN apt-get update && \ apt-get -y install \ wget \ zip \ python3-pip \ python3-dev \ git \ && cd /usr/local/bin \ && l...
FROM ubuntu:18.04 LABEL description="knowledge-repo service" # Define some build time variables ARG PIP=pip3 ARG VERSION=0.9.0 # Install required tools and libraries RUN apt-get update && \ apt-get -y install \ wget \ zip \ python3-pip \ python3-dev \ git \ && cd /usr/local/bin \ && l...
JJJ000
09fe061460e3463c33b7eb811899ae6ee4a959c9
2eafc06a4c57ff710283e2fdc3abf0cb17d15e1d
Avoid reducing the version number?
csharplus
14
airbnb/knowledge-repo
631
reformat unit test code
Description of changeset: reformat code Test Plan: [x]CI @csharplus
null
2022-03-23 02:45:22+00:00
2022-03-26 21:37:54+00:00
knowledge_repo/config.py
from .constants import PY_EXTENSION, YML_EXTENSION from .utils.files import read_yaml import functools import importlib import logging import os import sys import time import types logger = logging.getLogger(__name__) class KnowledgeRepositoryConfig(dict): def __init__(self, repo, *args, **kwargs): self...
from .constants import PY_EXTENSION, YML_EXTENSION from .utils.files import read_yaml import functools import importlib import logging import os import sys import time import types logger = logging.getLogger(__name__) class KnowledgeRepositoryConfig(dict): def __init__(self, repo, *args, **kwargs): sel...
JJJ000
48416e89dbdc485efd7d95fa99f9d28adcd79d12
ce89b54b9c18b8f639facb122b7427d0b4d7c369
Let's keep all import statements sorted in alphabetical order for easy maintenance.
csharplus
15
py-why/dowhy
1,120
Rename classes in test folder
The TestEstimator and TestRefuter were falsely interpreted as unit test classes due to their "Test" prefix.
null
2023-12-11 15:43:46+00:00
2023-12-11 18:52:07+00:00
tests/gcm/test_stochastic_models.py
import numpy as np import pytest from flaky import flaky from pytest import approx from scipy import stats from dowhy.gcm import BayesianGaussianMixtureDistribution, EmpiricalDistribution, ScipyDistribution def test_when_fitting_bayesian_gaussian_mixture_distribution_then_samples_should_be_drawn_correctly(): tes...
import numpy as np import pytest from flaky import flaky from pytest import approx from scipy import stats from dowhy.gcm import BayesianGaussianMixtureDistribution, EmpiricalDistribution, ScipyDistribution def test_when_fitting_bayesian_gaussian_mixture_distribution_then_samples_should_be_drawn_correctly(): tes...
bloebp
711e6ba9025f42b20c6f7b423bafae2913f94d2d
1f9ee6be46ad35ce5a710acc3e259fc8360f8a38
Recommend not to introduce many changes in one PR (specially as the change here should only concern class renaming).
kailashbuki
0
py-why/dowhy
1,114
Fix bug in networkx plot function with 0 error strenghts
null
null
2023-12-08 20:17:35+00:00
2023-12-11 18:56:00+00:00
dowhy/utils/plotting.py
import logging import os import tempfile from typing import Any, Dict, List, Optional, Tuple, Union import matplotlib.pyplot as plt import networkx as nx import numpy as np import pandas as pd from matplotlib import image _logger = logging.getLogger(__name__) def plot( causal_graph: nx.Graph, layout_prog: O...
import logging import os import tempfile from typing import Any, Dict, List, Optional, Tuple, Union import matplotlib.pyplot as plt import networkx as nx import numpy as np import pandas as pd from matplotlib import image _logger = logging.getLogger(__name__) def plot( causal_graph: nx.Graph, layout_prog: O...
bloebp
4f317345dcc5fc8763b13105bd5906e3434ace2f
72986a859db309b1afef92a542955569669bd8ea
Recommend a check beforehand to ensure that the `strength` is less than or equal to `max_strength`.
kailashbuki
1
py-why/dowhy
1,088
Overhauled readme
The current readme is too overloaded for users. Changes here are: - Reduce it only the essential points, since most of the content is part of the documentation - Add image as overview of the offered features - Made connection between GCM and PO framework more consistent - Revise the GCM example to an executable c...
null
2023-11-26 05:56:29+00:00
2023-12-01 14:58:26+00:00
README.rst
|BuildStatus|_ |PyPiVersion|_ |PythonSupport|_ |Downloads|_ |discord|_ .. |PyPiVersion| image:: https://img.shields.io/pypi/v/dowhy.svg .. _PyPiVersion: https://pypi.org/project/dowhy/ .. |PythonSupport| image:: https://img.shields.io/pypi/pyversions/dowhy.svg .. _PythonSupport: https://pypi.org/project/dowhy/ .. |B...
|BuildStatus|_ |PyPiVersion|_ |PythonSupport|_ |Downloads|_ |discord|_ .. |PyPiVersion| image:: https://img.shields.io/pypi/v/dowhy.svg .. _PyPiVersion: https://pypi.org/project/dowhy/ .. |PythonSupport| image:: https://img.shields.io/pypi/pyversions/dowhy.svg .. _PythonSupport: https://pypi.org/project/dowhy/ .. |B...
bloebp
591e9d916e19bcad07e28687aeb8c81e1db26e8d
f455c569db0e7d0c1e1e7b54d1f8c85f026ec611
is there a specific reason for removing the conda installation guide? There is a currently an issue with conda build that we can fix. It is also nice to share how to get the development version.
amit-sharma
2
py-why/dowhy
1,088
Overhauled readme
The current readme is too overloaded for users. Changes here are: - Reduce it only the essential points, since most of the content is part of the documentation - Add image as overview of the offered features - Made connection between GCM and PO framework more consistent - Revise the GCM example to an executable c...
null
2023-11-26 05:56:29+00:00
2023-12-01 14:58:26+00:00
README.rst
|BuildStatus|_ |PyPiVersion|_ |PythonSupport|_ |Downloads|_ |discord|_ .. |PyPiVersion| image:: https://img.shields.io/pypi/v/dowhy.svg .. _PyPiVersion: https://pypi.org/project/dowhy/ .. |PythonSupport| image:: https://img.shields.io/pypi/pyversions/dowhy.svg .. _PythonSupport: https://pypi.org/project/dowhy/ .. |B...
|BuildStatus|_ |PyPiVersion|_ |PythonSupport|_ |Downloads|_ |discord|_ .. |PyPiVersion| image:: https://img.shields.io/pypi/v/dowhy.svg .. _PyPiVersion: https://pypi.org/project/dowhy/ .. |PythonSupport| image:: https://img.shields.io/pypi/pyversions/dowhy.svg .. _PythonSupport: https://pypi.org/project/dowhy/ .. |B...
bloebp
591e9d916e19bcad07e28687aeb8c81e1db26e8d
f455c569db0e7d0c1e1e7b54d1f8c85f026ec611
is there a specific reason for removing the conda installation guide? There is a currently an issue with conda build that we can fix.
amit-sharma
3
py-why/dowhy
1,088
Overhauled readme
The current readme is too overloaded for users. Changes here are: - Reduce it only the essential points, since most of the content is part of the documentation - Add image as overview of the offered features - Made connection between GCM and PO framework more consistent - Revise the GCM example to an executable c...
null
2023-11-26 05:56:29+00:00
2023-12-01 14:58:26+00:00
README.rst
|BuildStatus|_ |PyPiVersion|_ |PythonSupport|_ |Downloads|_ |discord|_ .. |PyPiVersion| image:: https://img.shields.io/pypi/v/dowhy.svg .. _PyPiVersion: https://pypi.org/project/dowhy/ .. |PythonSupport| image:: https://img.shields.io/pypi/pyversions/dowhy.svg .. _PythonSupport: https://pypi.org/project/dowhy/ .. |B...
|BuildStatus|_ |PyPiVersion|_ |PythonSupport|_ |Downloads|_ |discord|_ .. |PyPiVersion| image:: https://img.shields.io/pypi/v/dowhy.svg .. _PyPiVersion: https://pypi.org/project/dowhy/ .. |PythonSupport| image:: https://img.shields.io/pypi/pyversions/dowhy.svg .. _PythonSupport: https://pypi.org/project/dowhy/ .. |B...
bloebp
591e9d916e19bcad07e28687aeb8c81e1db26e8d
f455c569db0e7d0c1e1e7b54d1f8c85f026ec611
Let's make it: 'Effect identification and estimation.' since identification happens first.
amit-sharma
4
py-why/dowhy
1,088
Overhauled readme
The current readme is too overloaded for users. Changes here are: - Reduce it only the essential points, since most of the content is part of the documentation - Add image as overview of the offered features - Made connection between GCM and PO framework more consistent - Revise the GCM example to an executable c...
null
2023-11-26 05:56:29+00:00
2023-12-01 14:58:26+00:00
README.rst
|BuildStatus|_ |PyPiVersion|_ |PythonSupport|_ |Downloads|_ |discord|_ .. |PyPiVersion| image:: https://img.shields.io/pypi/v/dowhy.svg .. _PyPiVersion: https://pypi.org/project/dowhy/ .. |PythonSupport| image:: https://img.shields.io/pypi/pyversions/dowhy.svg .. _PythonSupport: https://pypi.org/project/dowhy/ .. |B...
|BuildStatus|_ |PyPiVersion|_ |PythonSupport|_ |Downloads|_ |discord|_ .. |PyPiVersion| image:: https://img.shields.io/pypi/v/dowhy.svg .. _PyPiVersion: https://pypi.org/project/dowhy/ .. |PythonSupport| image:: https://img.shields.io/pypi/pyversions/dowhy.svg .. _PythonSupport: https://pypi.org/project/dowhy/ .. |B...
bloebp
591e9d916e19bcad07e28687aeb8c81e1db26e8d
f455c569db0e7d0c1e1e7b54d1f8c85f026ec611
"follows modern concepts" -- feels awkward. Modern can be vague. how about, "follows best practices"?
amit-sharma
5
py-why/dowhy
1,088
Overhauled readme
The current readme is too overloaded for users. Changes here are: - Reduce it only the essential points, since most of the content is part of the documentation - Add image as overview of the offered features - Made connection between GCM and PO framework more consistent - Revise the GCM example to an executable c...
null
2023-11-26 05:56:29+00:00
2023-12-01 14:58:26+00:00
README.rst
|BuildStatus|_ |PyPiVersion|_ |PythonSupport|_ |Downloads|_ |discord|_ .. |PyPiVersion| image:: https://img.shields.io/pypi/v/dowhy.svg .. _PyPiVersion: https://pypi.org/project/dowhy/ .. |PythonSupport| image:: https://img.shields.io/pypi/pyversions/dowhy.svg .. _PythonSupport: https://pypi.org/project/dowhy/ .. |B...
|BuildStatus|_ |PyPiVersion|_ |PythonSupport|_ |Downloads|_ |discord|_ .. |PyPiVersion| image:: https://img.shields.io/pypi/v/dowhy.svg .. _PyPiVersion: https://pypi.org/project/dowhy/ .. |PythonSupport| image:: https://img.shields.io/pypi/pyversions/dowhy.svg .. _PythonSupport: https://pypi.org/project/dowhy/ .. |B...
bloebp
591e9d916e19bcad07e28687aeb8c81e1db26e8d
f455c569db0e7d0c1e1e7b54d1f8c85f026ec611
"or checkout `Jupyter...." "the other" can be removed?
amit-sharma
6
py-why/dowhy
1,088
Overhauled readme
The current readme is too overloaded for users. Changes here are: - Reduce it only the essential points, since most of the content is part of the documentation - Add image as overview of the offered features - Made connection between GCM and PO framework more consistent - Revise the GCM example to an executable c...
null
2023-11-26 05:56:29+00:00
2023-12-01 14:58:26+00:00
README.rst
|BuildStatus|_ |PyPiVersion|_ |PythonSupport|_ |Downloads|_ |discord|_ .. |PyPiVersion| image:: https://img.shields.io/pypi/v/dowhy.svg .. _PyPiVersion: https://pypi.org/project/dowhy/ .. |PythonSupport| image:: https://img.shields.io/pypi/pyversions/dowhy.svg .. _PythonSupport: https://pypi.org/project/dowhy/ .. |B...
|BuildStatus|_ |PyPiVersion|_ |PythonSupport|_ |Downloads|_ |discord|_ .. |PyPiVersion| image:: https://img.shields.io/pypi/v/dowhy.svg .. _PyPiVersion: https://pypi.org/project/dowhy/ .. |PythonSupport| image:: https://img.shields.io/pypi/pyversions/dowhy.svg .. _PythonSupport: https://pypi.org/project/dowhy/ .. |B...
bloebp
591e9d916e19bcad07e28687aeb8c81e1db26e8d
f455c569db0e7d0c1e1e7b54d1f8c85f026ec611
The reason was due to the very outdated conda version (still on 0.8). I will put it back in, but let's try to fix the build issues there.
bloebp
7
py-why/dowhy
1,088
Overhauled readme
The current readme is too overloaded for users. Changes here are: - Reduce it only the essential points, since most of the content is part of the documentation - Add image as overview of the offered features - Made connection between GCM and PO framework more consistent - Revise the GCM example to an executable c...
null
2023-11-26 05:56:29+00:00
2023-12-01 14:58:26+00:00
README.rst
|BuildStatus|_ |PyPiVersion|_ |PythonSupport|_ |Downloads|_ |discord|_ .. |PyPiVersion| image:: https://img.shields.io/pypi/v/dowhy.svg .. _PyPiVersion: https://pypi.org/project/dowhy/ .. |PythonSupport| image:: https://img.shields.io/pypi/pyversions/dowhy.svg .. _PythonSupport: https://pypi.org/project/dowhy/ .. |B...
|BuildStatus|_ |PyPiVersion|_ |PythonSupport|_ |Downloads|_ |discord|_ .. |PyPiVersion| image:: https://img.shields.io/pypi/v/dowhy.svg .. _PyPiVersion: https://pypi.org/project/dowhy/ .. |PythonSupport| image:: https://img.shields.io/pypi/pyversions/dowhy.svg .. _PythonSupport: https://pypi.org/project/dowhy/ .. |B...
bloebp
591e9d916e19bcad07e28687aeb8c81e1db26e8d
f455c569db0e7d0c1e1e7b54d1f8c85f026ec611
Agree, what does "modern" even mean and is also subjective to the application. I changed it to "It is based on Pearl's graphical causal model framework and models the causal data generation process of each variable explicitly via *causal mechanisms* to support a wide range of causal algorithms."
bloebp
8
py-why/dowhy
1,088
Overhauled readme
The current readme is too overloaded for users. Changes here are: - Reduce it only the essential points, since most of the content is part of the documentation - Add image as overview of the offered features - Made connection between GCM and PO framework more consistent - Revise the GCM example to an executable c...
null
2023-11-26 05:56:29+00:00
2023-12-01 14:58:26+00:00
README.rst
|BuildStatus|_ |PyPiVersion|_ |PythonSupport|_ |Downloads|_ |discord|_ .. |PyPiVersion| image:: https://img.shields.io/pypi/v/dowhy.svg .. _PyPiVersion: https://pypi.org/project/dowhy/ .. |PythonSupport| image:: https://img.shields.io/pypi/pyversions/dowhy.svg .. _PythonSupport: https://pypi.org/project/dowhy/ .. |B...
|BuildStatus|_ |PyPiVersion|_ |PythonSupport|_ |Downloads|_ |discord|_ .. |PyPiVersion| image:: https://img.shields.io/pypi/v/dowhy.svg .. _PyPiVersion: https://pypi.org/project/dowhy/ .. |PythonSupport| image:: https://img.shields.io/pypi/pyversions/dowhy.svg .. _PythonSupport: https://pypi.org/project/dowhy/ .. |B...
bloebp
591e9d916e19bcad07e28687aeb8c81e1db26e8d
f455c569db0e7d0c1e1e7b54d1f8c85f026ec611
conda issue is now resolved: https://github.com/conda-forge/dowhy-feedstock/pull/10
amit-sharma
9
py-why/dowhy
1,088
Overhauled readme
The current readme is too overloaded for users. Changes here are: - Reduce it only the essential points, since most of the content is part of the documentation - Add image as overview of the offered features - Made connection between GCM and PO framework more consistent - Revise the GCM example to an executable c...
null
2023-11-26 05:56:29+00:00
2023-12-01 14:58:26+00:00
README.rst
|BuildStatus|_ |PyPiVersion|_ |PythonSupport|_ |Downloads|_ |discord|_ .. |PyPiVersion| image:: https://img.shields.io/pypi/v/dowhy.svg .. _PyPiVersion: https://pypi.org/project/dowhy/ .. |PythonSupport| image:: https://img.shields.io/pypi/pyversions/dowhy.svg .. _PythonSupport: https://pypi.org/project/dowhy/ .. |B...
|BuildStatus|_ |PyPiVersion|_ |PythonSupport|_ |Downloads|_ |discord|_ .. |PyPiVersion| image:: https://img.shields.io/pypi/v/dowhy.svg .. _PyPiVersion: https://pypi.org/project/dowhy/ .. |PythonSupport| image:: https://img.shields.io/pypi/pyversions/dowhy.svg .. _PythonSupport: https://pypi.org/project/dowhy/ .. |B...
bloebp
591e9d916e19bcad07e28687aeb8c81e1db26e8d
f455c569db0e7d0c1e1e7b54d1f8c85f026ec611
Awesome! I already put the conda installation guide back in.
bloebp
10
py-why/dowhy
1,050
Add new method to estimate KL divergence using classifier
This should work better with multivariate data and mixed data types. However, it is slower than the knn approach.
null
2023-10-20 02:13:28+00:00
2023-11-15 15:00:17+00:00
dowhy/gcm/stochastic_models.py
"""This module defines multiple implementations of the abstract class :class:`~dowhy.gcm.graph.StochasticModel`. Classes in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from typing import Dict, Optional, Tuple, Union import numpy as np ...
"""This module defines multiple implementations of the abstract class :class:`~dowhy.gcm.graph.StochasticModel`. Classes in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from typing import Dict, Optional, Tuple, Union import numpy as np ...
bloebp
395d1fa46743234fdbaf765e548b85e8089d0c7e
eb887358064d72611387b41510a77223952bfdb8
I assume you've run into import cycles and that's why you had to do a local import. This is likely a smell. I'm sure this problem is related to [this change in PR 932](https://github.com/py-why/dowhy/pull/932/files#diff-62eae184e3560bffa3e7cbc57e06f30910651732d961cf7e34c1a032e3c541fd). `PredictionModel` is an interface...
petergtz
11
py-why/dowhy
1,050
Add new method to estimate KL divergence using classifier
This should work better with multivariate data and mixed data types. However, it is slower than the knn approach.
null
2023-10-20 02:13:28+00:00
2023-11-15 15:00:17+00:00
dowhy/gcm/stochastic_models.py
"""This module defines multiple implementations of the abstract class :class:`~dowhy.gcm.graph.StochasticModel`. Classes in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from typing import Dict, Optional, Tuple, Union import numpy as np ...
"""This module defines multiple implementations of the abstract class :class:`~dowhy.gcm.graph.StochasticModel`. Classes in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from typing import Dict, Optional, Tuple, Union import numpy as np ...
bloebp
395d1fa46743234fdbaf765e548b85e8089d0c7e
eb887358064d72611387b41510a77223952bfdb8
It is unfortunately a bit more complicated because the new KL divergence method now also relies on the auto module (for optional automatic selection of the classifier model), which in turn imports the `EmpiricalDistribution` from the `stochastic_models` module. We might need to move these implementations into separate ...
bloebp
12
py-why/dowhy
1,049
GCM auto assignment now returns a summary object
The summary object contains information about the evaluated models and model choices. This object is printable to provide quick summary.
null
2023-10-16 19:40:03+00:00
2023-11-02 18:42:28+00:00
dowhy/gcm/auto.py
import warnings from enum import Enum, auto from functools import partial from typing import Callable, List, Optional, Union import numpy as np import pandas as pd from joblib import Parallel, delayed from sklearn import metrics from sklearn.exceptions import ConvergenceWarning from sklearn.linear_model import LinearR...
import warnings from enum import Enum, auto from functools import partial from typing import Any, Callable, Dict, List, Optional, Tuple, Union import networkx as nx import numpy as np import pandas as pd from joblib import Parallel, delayed from sklearn import metrics from sklearn.exceptions import ConvergenceWarning ...
bloebp
86fcb28ba23269922dad2c2b93a00fca3c611e0f
d83fc3f022c9ce4bc8f3ebfc7eee099a3c5db74b
`.keys()` is redundant here
kailashbuki
13
py-why/dowhy
1,026
Update the causal discovery notebook with examples using causal-learn
Updating the old notebook as mentioned in #1021.
null
2023-08-30 21:25:09+00:00
2023-10-05 21:26:19+00:00
docs/source/example_notebooks/dowhy_causal_discovery_example.ipynb
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Causal Discovery example\n", "\n", "The goal of this notebook is to show how causal discovery methods can work with DoWhy. We use discovery methods from [Causal Discovery Tool (CDT)](https://github.com/FenTechSolutions/Causal...
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Causal Discovery example\n", "\n", "The goal of this notebook is to show how causal discovery methods can work with DoWhy. We use discovery methods from [causal-learn](https://github.com/py-why/causal-learn) repo. As we will ...
kunwuz
67b305db5224bf718067a21acfe4baa92a7d2c8c
7eb4a0c253514a920588d1ab222e1aeb5e07cb51
"We use the CDT library" should be "we use the causal-learn library"
emrekiciman
14
py-why/dowhy
1,026
Update the causal discovery notebook with examples using causal-learn
Updating the old notebook as mentioned in #1021.
null
2023-08-30 21:25:09+00:00
2023-10-05 21:26:19+00:00
docs/source/example_notebooks/dowhy_causal_discovery_example.ipynb
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Causal Discovery example\n", "\n", "The goal of this notebook is to show how causal discovery methods can work with DoWhy. We use discovery methods from [Causal Discovery Tool (CDT)](https://github.com/FenTechSolutions/Causal...
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Causal Discovery example\n", "\n", "The goal of this notebook is to show how causal discovery methods can work with DoWhy. We use discovery methods from [causal-learn](https://github.com/py-why/causal-learn) repo. As we will ...
kunwuz
67b305db5224bf718067a21acfe4baa92a7d2c8c
7eb4a0c253514a920588d1ab222e1aeb5e07cb51
Consider adding a link to the top-level documentation to help readers explore all the other methods supported by causal-learn
emrekiciman
15
py-why/dowhy
1,026
Update the causal discovery notebook with examples using causal-learn
Updating the old notebook as mentioned in #1021.
null
2023-08-30 21:25:09+00:00
2023-10-05 21:26:19+00:00
docs/source/example_notebooks/dowhy_causal_discovery_example.ipynb
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Causal Discovery example\n", "\n", "The goal of this notebook is to show how causal discovery methods can work with DoWhy. We use discovery methods from [Causal Discovery Tool (CDT)](https://github.com/FenTechSolutions/Causal...
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Causal Discovery example\n", "\n", "The goal of this notebook is to show how causal discovery methods can work with DoWhy. We use discovery methods from [causal-learn](https://github.com/py-why/causal-learn) repo. As we will ...
kunwuz
67b305db5224bf718067a21acfe4baa92a7d2c8c
7eb4a0c253514a920588d1ab222e1aeb5e07cb51
the sachs dataset is still being loaded via CDT. Rather than require installing all of CDT, can we just copy the load_sachs function, giving credit and following license requirements. I believe it's a short function, though we'd also need an abbreviated version of the read_list_edges function. https://github.com/Fen...
emrekiciman
16
py-why/dowhy
1,026
Update the causal discovery notebook with examples using causal-learn
Updating the old notebook as mentioned in #1021.
null
2023-08-30 21:25:09+00:00
2023-10-05 21:26:19+00:00
docs/source/example_notebooks/dowhy_causal_discovery_example.ipynb
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Causal Discovery example\n", "\n", "The goal of this notebook is to show how causal discovery methods can work with DoWhy. We use discovery methods from [Causal Discovery Tool (CDT)](https://github.com/FenTechSolutions/Causal...
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Causal Discovery example\n", "\n", "The goal of this notebook is to show how causal discovery methods can work with DoWhy. We use discovery methods from [causal-learn](https://github.com/py-why/causal-learn) repo. As we will ...
kunwuz
67b305db5224bf718067a21acfe4baa92a7d2c8c
7eb4a0c253514a920588d1ab222e1aeb5e07cb51
Oh thanks for reminding this!
kunwuz
17
py-why/dowhy
1,026
Update the causal discovery notebook with examples using causal-learn
Updating the old notebook as mentioned in #1021.
null
2023-08-30 21:25:09+00:00
2023-10-05 21:26:19+00:00
docs/source/example_notebooks/dowhy_causal_discovery_example.ipynb
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Causal Discovery example\n", "\n", "The goal of this notebook is to show how causal discovery methods can work with DoWhy. We use discovery methods from [Causal Discovery Tool (CDT)](https://github.com/FenTechSolutions/Causal...
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Causal Discovery example\n", "\n", "The goal of this notebook is to show how causal discovery methods can work with DoWhy. We use discovery methods from [causal-learn](https://github.com/py-why/causal-learn) repo. As we will ...
kunwuz
67b305db5224bf718067a21acfe4baa92a7d2c8c
7eb4a0c253514a920588d1ab222e1aeb5e07cb51
Sure, that's a great idea.
kunwuz
18
py-why/dowhy
1,026
Update the causal discovery notebook with examples using causal-learn
Updating the old notebook as mentioned in #1021.
null
2023-08-30 21:25:09+00:00
2023-10-05 21:26:19+00:00
docs/source/example_notebooks/dowhy_causal_discovery_example.ipynb
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Causal Discovery example\n", "\n", "The goal of this notebook is to show how causal discovery methods can work with DoWhy. We use discovery methods from [Causal Discovery Tool (CDT)](https://github.com/FenTechSolutions/Causal...
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Causal Discovery example\n", "\n", "The goal of this notebook is to show how causal discovery methods can work with DoWhy. We use discovery methods from [causal-learn](https://github.com/py-why/causal-learn) repo. As we will ...
kunwuz
67b305db5224bf718067a21acfe4baa92a7d2c8c
7eb4a0c253514a920588d1ab222e1aeb5e07cb51
Yeah, you are totally right. It could be even better to have a causal-learn function that could automatically load various real-world datasets. I will code it up and update it in causal-learn.
kunwuz
19
py-why/dowhy
1,026
Update the causal discovery notebook with examples using causal-learn
Updating the old notebook as mentioned in #1021.
null
2023-08-30 21:25:09+00:00
2023-10-05 21:26:19+00:00
docs/source/example_notebooks/dowhy_causal_discovery_example.ipynb
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Causal Discovery example\n", "\n", "The goal of this notebook is to show how causal discovery methods can work with DoWhy. We use discovery methods from [Causal Discovery Tool (CDT)](https://github.com/FenTechSolutions/Causal...
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Causal Discovery example\n", "\n", "The goal of this notebook is to show how causal discovery methods can work with DoWhy. We use discovery methods from [causal-learn](https://github.com/py-why/causal-learn) repo. As we will ...
kunwuz
67b305db5224bf718067a21acfe4baa92a7d2c8c
7eb4a0c253514a920588d1ab222e1aeb5e07cb51
There's still a reference to CDT in the beginning of the sentence.
emrekiciman
20
py-why/dowhy
1,026
Update the causal discovery notebook with examples using causal-learn
Updating the old notebook as mentioned in #1021.
null
2023-08-30 21:25:09+00:00
2023-10-05 21:26:19+00:00
docs/source/example_notebooks/dowhy_causal_discovery_example.ipynb
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Causal Discovery example\n", "\n", "The goal of this notebook is to show how causal discovery methods can work with DoWhy. We use discovery methods from [Causal Discovery Tool (CDT)](https://github.com/FenTechSolutions/Causal...
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Causal Discovery example\n", "\n", "The goal of this notebook is to show how causal discovery methods can work with DoWhy. We use discovery methods from [causal-learn](https://github.com/py-why/causal-learn) repo. As we will ...
kunwuz
67b305db5224bf718067a21acfe4baa92a7d2c8c
7eb4a0c253514a920588d1ab222e1aeb5e07cb51
Also, 1 final reference to CDT on an earlier cell "Experiments on the Auto-MPG dataset")
emrekiciman
21
py-why/dowhy
1,013
Invariant nodes removal
Feature - Now users can enter the list of invariant nodes to the distribution_change function to remove them from analysis
null
2023-08-15 12:59:48+00:00
2023-08-24 16:12:46+00:00
dowhy/gcm/auto.py
import warnings from enum import Enum, auto from functools import partial from typing import Callable, List, Optional, Union import numpy as np import pandas as pd from joblib import Parallel, delayed from sklearn import metrics from sklearn.exceptions import ConvergenceWarning from sklearn.linear_model import LinearR...
import warnings from enum import Enum, auto from functools import partial from typing import Callable, List, Optional, Union import numpy as np import pandas as pd from joblib import Parallel, delayed from sklearn import metrics from sklearn.exceptions import ConvergenceWarning from sklearn.linear_model import LinearR...
bhatt-priyadutt
734b61671d130cf21a4e437084b9083dbd5c4a39
b4f80dcb2251a03aff4c816d7c6f6eb2aaf98e73
Good idea taking this is out as a separate function! It is probably useful for other use cases as well. Just a minor suggestion; consider renaming it to `assign_causal_mechanism_node` to be more consistent with the names of other methods.
bloebp
22
py-why/dowhy
1,013
Invariant nodes removal
Feature - Now users can enter the list of invariant nodes to the distribution_change function to remove them from analysis
null
2023-08-15 12:59:48+00:00
2023-08-24 16:12:46+00:00
dowhy/gcm/auto.py
import warnings from enum import Enum, auto from functools import partial from typing import Callable, List, Optional, Union import numpy as np import pandas as pd from joblib import Parallel, delayed from sklearn import metrics from sklearn.exceptions import ConvergenceWarning from sklearn.linear_model import LinearR...
import warnings from enum import Enum, auto from functools import partial from typing import Callable, List, Optional, Union import numpy as np import pandas as pd from joblib import Parallel, delayed from sklearn import metrics from sklearn.exceptions import ConvergenceWarning from sklearn.linear_model import LinearR...
bhatt-priyadutt
734b61671d130cf21a4e437084b9083dbd5c4a39
b4f80dcb2251a03aff4c816d7c6f6eb2aaf98e73
Instead of allowing `None` and setting a default value, let's make this explicit in the function definition by setting `quality: AssignmentQuality = AssignmentQuality.GOOD` and remove the `Optional` accordingly.
bloebp
23
py-why/dowhy
1,013
Invariant nodes removal
Feature - Now users can enter the list of invariant nodes to the distribution_change function to remove them from analysis
null
2023-08-15 12:59:48+00:00
2023-08-24 16:12:46+00:00
dowhy/gcm/auto.py
import warnings from enum import Enum, auto from functools import partial from typing import Callable, List, Optional, Union import numpy as np import pandas as pd from joblib import Parallel, delayed from sklearn import metrics from sklearn.exceptions import ConvergenceWarning from sklearn.linear_model import LinearR...
import warnings from enum import Enum, auto from functools import partial from typing import Callable, List, Optional, Union import numpy as np import pandas as pd from joblib import Parallel, delayed from sklearn import metrics from sklearn.exceptions import ConvergenceWarning from sklearn.linear_model import LinearR...
bhatt-priyadutt
734b61671d130cf21a4e437084b9083dbd5c4a39
b4f80dcb2251a03aff4c816d7c6f6eb2aaf98e73
Here, If you see where the **_remove_invariant_nodes** is called, the **quality** can be **None** as well and so to handle that case, I chose to write it like that. If I make the default to be the value you have said above, I will have to handle in the upstream **_remove_invariant_nodes** to make sure that None does n...
bhatt-priyadutt
24
py-why/dowhy
1,013
Invariant nodes removal
Feature - Now users can enter the list of invariant nodes to the distribution_change function to remove them from analysis
null
2023-08-15 12:59:48+00:00
2023-08-24 16:12:46+00:00
dowhy/gcm/auto.py
import warnings from enum import Enum, auto from functools import partial from typing import Callable, List, Optional, Union import numpy as np import pandas as pd from joblib import Parallel, delayed from sklearn import metrics from sklearn.exceptions import ConvergenceWarning from sklearn.linear_model import LinearR...
import warnings from enum import Enum, auto from functools import partial from typing import Callable, List, Optional, Union import numpy as np import pandas as pd from joblib import Parallel, delayed from sklearn import metrics from sklearn.exceptions import ConvergenceWarning from sklearn.linear_model import LinearR...
bhatt-priyadutt
734b61671d130cf21a4e437084b9083dbd5c4a39
b4f80dcb2251a03aff4c816d7c6f6eb2aaf98e73
I see. The reason why `None` is an option in `distribution_change` is to indicate to use the existing models and not do an auto assignment. However, at the point of calling `assign_causal_mechanism_node`, a `None` parameter doesn't make sense anymore. So, I would then rather check before calling this whether it is `Non...
bloebp
25
py-why/dowhy
1,013
Invariant nodes removal
Feature - Now users can enter the list of invariant nodes to the distribution_change function to remove them from analysis
null
2023-08-15 12:59:48+00:00
2023-08-24 16:12:46+00:00
dowhy/gcm/auto.py
import warnings from enum import Enum, auto from functools import partial from typing import Callable, List, Optional, Union import numpy as np import pandas as pd from joblib import Parallel, delayed from sklearn import metrics from sklearn.exceptions import ConvergenceWarning from sklearn.linear_model import LinearR...
import warnings from enum import Enum, auto from functools import partial from typing import Callable, List, Optional, Union import numpy as np import pandas as pd from joblib import Parallel, delayed from sklearn import metrics from sklearn.exceptions import ConvergenceWarning from sklearn.linear_model import LinearR...
bhatt-priyadutt
734b61671d130cf21a4e437084b9083dbd5c4a39
b4f80dcb2251a03aff4c816d7c6f6eb2aaf98e73
done
bhatt-priyadutt
26
py-why/dowhy
1,013
Invariant nodes removal
Feature - Now users can enter the list of invariant nodes to the distribution_change function to remove them from analysis
null
2023-08-15 12:59:48+00:00
2023-08-24 16:12:46+00:00
dowhy/gcm/distribution_change.py
"""This module defines functions to attribute distribution changes. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging from typing import Any, Callable, Dict, Optional, Tuple, Union import networkx as nx import numpy as np import ...
"""This module defines functions to attribute distribution changes. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging from typing import Any, Callable, Dict, List, Optional, Tuple, Union import networkx as nx import numpy as np i...
bhatt-priyadutt
734b61671d130cf21a4e437084b9083dbd5c4a39
b4f80dcb2251a03aff4c816d7c6f6eb2aaf98e73
Instead of 'constant' what about something like: "List of nodes where the mechanism is kept constant regardless of changes in the datasets being analyzed"
bloebp
27
py-why/dowhy
1,013
Invariant nodes removal
Feature - Now users can enter the list of invariant nodes to the distribution_change function to remove them from analysis
null
2023-08-15 12:59:48+00:00
2023-08-24 16:12:46+00:00
dowhy/gcm/distribution_change.py
"""This module defines functions to attribute distribution changes. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging from typing import Any, Callable, Dict, Optional, Tuple, Union import networkx as nx import numpy as np import ...
"""This module defines functions to attribute distribution changes. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging from typing import Any, Callable, Dict, List, Optional, Tuple, Union import networkx as nx import numpy as np i...
bhatt-priyadutt
734b61671d130cf21a4e437084b9083dbd5c4a39
b4f80dcb2251a03aff4c816d7c6f6eb2aaf98e73
While there might be use cases outside of the distribution change, let's for now keep it as an internal function here, i.e., add an `_` in front of the name. Also consider moving it at the bottom of the function so that the public facing methods are at the top.
bloebp
28
py-why/dowhy
1,013
Invariant nodes removal
Feature - Now users can enter the list of invariant nodes to the distribution_change function to remove them from analysis
null
2023-08-15 12:59:48+00:00
2023-08-24 16:12:46+00:00
dowhy/gcm/distribution_change.py
"""This module defines functions to attribute distribution changes. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging from typing import Any, Callable, Dict, Optional, Tuple, Union import networkx as nx import numpy as np import ...
"""This module defines functions to attribute distribution changes. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging from typing import Any, Callable, Dict, List, Optional, Tuple, Union import networkx as nx import numpy as np i...
bhatt-priyadutt
734b61671d130cf21a4e437084b9083dbd5c4a39
b4f80dcb2251a03aff4c816d7c6f6eb2aaf98e73
The type for `invariant_nodes` should be `List[Any]` for consistency.
bloebp
29
py-why/dowhy
1,013
Invariant nodes removal
Feature - Now users can enter the list of invariant nodes to the distribution_change function to remove them from analysis
null
2023-08-15 12:59:48+00:00
2023-08-24 16:12:46+00:00
dowhy/gcm/distribution_change.py
"""This module defines functions to attribute distribution changes. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging from typing import Any, Callable, Dict, Optional, Tuple, Union import networkx as nx import numpy as np import ...
"""This module defines functions to attribute distribution changes. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging from typing import Any, Callable, Dict, List, Optional, Tuple, Union import networkx as nx import numpy as np i...
bhatt-priyadutt
734b61671d130cf21a4e437084b9083dbd5c4a39
b4f80dcb2251a03aff4c816d7c6f6eb2aaf98e73
Similar as above: The type for `invariant_nodes` should be `List[Any]` for consistency.
bloebp
30
py-why/dowhy
1,013
Invariant nodes removal
Feature - Now users can enter the list of invariant nodes to the distribution_change function to remove them from analysis
null
2023-08-15 12:59:48+00:00
2023-08-24 16:12:46+00:00
dowhy/gcm/distribution_change.py
"""This module defines functions to attribute distribution changes. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging from typing import Any, Callable, Dict, Optional, Tuple, Union import networkx as nx import numpy as np import ...
"""This module defines functions to attribute distribution changes. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging from typing import Any, Callable, Dict, List, Optional, Tuple, Union import networkx as nx import numpy as np i...
bhatt-priyadutt
734b61671d130cf21a4e437084b9083dbd5c4a39
b4f80dcb2251a03aff4c816d7c6f6eb2aaf98e73
What about skipping this if `auto_assignment_quality` is `None` since you allow it to be optional. In that way, we can also use this method to just get the new graph.
bloebp
31
py-why/dowhy
1,013
Invariant nodes removal
Feature - Now users can enter the list of invariant nodes to the distribution_change function to remove them from analysis
null
2023-08-15 12:59:48+00:00
2023-08-24 16:12:46+00:00
dowhy/gcm/distribution_change.py
"""This module defines functions to attribute distribution changes. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging from typing import Any, Callable, Dict, Optional, Tuple, Union import networkx as nx import numpy as np import ...
"""This module defines functions to attribute distribution changes. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging from typing import Any, Callable, Dict, List, Optional, Tuple, Union import networkx as nx import numpy as np i...
bhatt-priyadutt
734b61671d130cf21a4e437084b9083dbd5c4a39
b4f80dcb2251a03aff4c816d7c6f6eb2aaf98e73
Check explicitly: `if invariant_nodes is not None:`
bloebp
32
py-why/dowhy
1,013
Invariant nodes removal
Feature - Now users can enter the list of invariant nodes to the distribution_change function to remove them from analysis
null
2023-08-15 12:59:48+00:00
2023-08-24 16:12:46+00:00
dowhy/gcm/distribution_change.py
"""This module defines functions to attribute distribution changes. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging from typing import Any, Callable, Dict, Optional, Tuple, Union import networkx as nx import numpy as np import ...
"""This module defines functions to attribute distribution changes. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging from typing import Any, Callable, Dict, List, Optional, Tuple, Union import networkx as nx import numpy as np i...
bhatt-priyadutt
734b61671d130cf21a4e437084b9083dbd5c4a39
b4f80dcb2251a03aff4c816d7c6f6eb2aaf98e73
@bloebp can you please explain more on this....i didnt understood here!
bhatt-priyadutt
33
py-why/dowhy
1,013
Invariant nodes removal
Feature - Now users can enter the list of invariant nodes to the distribution_change function to remove them from analysis
null
2023-08-15 12:59:48+00:00
2023-08-24 16:12:46+00:00
dowhy/gcm/distribution_change.py
"""This module defines functions to attribute distribution changes. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging from typing import Any, Callable, Dict, Optional, Tuple, Union import networkx as nx import numpy as np import ...
"""This module defines functions to attribute distribution changes. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging from typing import Any, Callable, Dict, List, Optional, Tuple, Union import networkx as nx import numpy as np i...
bhatt-priyadutt
734b61671d130cf21a4e437084b9083dbd5c4a39
b4f80dcb2251a03aff4c816d7c6f6eb2aaf98e73
What I meant is something like: ``` if auto_assignment_quality is not None: for child in children: set_causal_mechanism_for_node(causal_model, child, old_data, quality=auto_assignment_quality) ``` In that way, one can still get the modified model without running the auto assignment on the children no...
bloebp
34
py-why/dowhy
1,013
Invariant nodes removal
Feature - Now users can enter the list of invariant nodes to the distribution_change function to remove them from analysis
null
2023-08-15 12:59:48+00:00
2023-08-24 16:12:46+00:00
dowhy/gcm/distribution_change.py
"""This module defines functions to attribute distribution changes. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging from typing import Any, Callable, Dict, Optional, Tuple, Union import networkx as nx import numpy as np import ...
"""This module defines functions to attribute distribution changes. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging from typing import Any, Callable, Dict, List, Optional, Tuple, Union import networkx as nx import numpy as np i...
bhatt-priyadutt
734b61671d130cf21a4e437084b9083dbd5c4a39
b4f80dcb2251a03aff4c816d7c6f6eb2aaf98e73
If we do this then we will not be able to get updated model for child nodes when assignment quality is None right? and this is which we dont want. Or i am still unable to understand the reason. Also, please see the below image where this function is getting called, its called after the assigning of the old causal graph...
bhatt-priyadutt
35
py-why/dowhy
1,013
Invariant nodes removal
Feature - Now users can enter the list of invariant nodes to the distribution_change function to remove them from analysis
null
2023-08-15 12:59:48+00:00
2023-08-24 16:12:46+00:00
dowhy/gcm/distribution_change.py
"""This module defines functions to attribute distribution changes. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging from typing import Any, Callable, Dict, Optional, Tuple, Union import networkx as nx import numpy as np import ...
"""This module defines functions to attribute distribution changes. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging from typing import Any, Callable, Dict, List, Optional, Tuple, Union import networkx as nx import numpy as np i...
bhatt-priyadutt
734b61671d130cf21a4e437084b9083dbd5c4a39
b4f80dcb2251a03aff4c816d7c6f6eb2aaf98e73
Ok yes, nevermind my comment, I was thinking of a use-case outside of this method where a user just wants the corrected graph structure without necessarily having a new mechanism assigned. But then we would also need to make the data optional. Let's keep the logic as is, but to avoid confusion, the assignment qualit...
bloebp
36
py-why/dowhy
967
Remove kwargs from falsify, improve docstrings
This commit updates `gcm/falsify` in the following ways: - Remove the `**kwargs` for `validate_graph` and `falsify_graph`. Instead, validation methods given to those functions should be wrapped in `wrap_partial`, e.g. if we want to validate a graph `G` and test local Markov conditions and pairwise dependencies on ob...
null
2023-07-04 13:58:30+00:00
2023-07-18 14:19:10+00:00
dowhy/gcm/falsify.py
"""This module provides functionality to falsify a user-given DAG given observed data. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from dataclasses import dataclass, field from enum import Enum, auto from functools import pa...
"""This module provides functionality to falsify a user-given DAG given observed data. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from dataclasses import dataclass, field from enum import Enum, auto from functools import pa...
eeulig
379f188d674d5be6d644559f9f54852b87403f7c
4e30c63fe1113e35259e7fb3400a6f09bca4d699
What about using `nan` instead of `-1`? That makes it clearer.
bloebp
37
py-why/dowhy
967
Remove kwargs from falsify, improve docstrings
This commit updates `gcm/falsify` in the following ways: - Remove the `**kwargs` for `validate_graph` and `falsify_graph`. Instead, validation methods given to those functions should be wrapped in `wrap_partial`, e.g. if we want to validate a graph `G` and test local Markov conditions and pairwise dependencies on ob...
null
2023-07-04 13:58:30+00:00
2023-07-18 14:19:10+00:00
dowhy/gcm/falsify.py
"""This module provides functionality to falsify a user-given DAG given observed data. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from dataclasses import dataclass, field from enum import Enum, auto from functools import pa...
"""This module provides functionality to falsify a user-given DAG given observed data. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from dataclasses import dataclass, field from enum import Enum, auto from functools import pa...
eeulig
379f188d674d5be6d644559f9f54852b87403f7c
4e30c63fe1113e35259e7fb3400a6f09bca4d699
What does `tpa` stand for? Isn't `dsep` already a good hint what this method validates?
bloebp
38
py-why/dowhy
967
Remove kwargs from falsify, improve docstrings
This commit updates `gcm/falsify` in the following ways: - Remove the `**kwargs` for `validate_graph` and `falsify_graph`. Instead, validation methods given to those functions should be wrapped in `wrap_partial`, e.g. if we want to validate a graph `G` and test local Markov conditions and pairwise dependencies on ob...
null
2023-07-04 13:58:30+00:00
2023-07-18 14:19:10+00:00
dowhy/gcm/falsify.py
"""This module provides functionality to falsify a user-given DAG given observed data. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from dataclasses import dataclass, field from enum import Enum, auto from functools import pa...
"""This module provides functionality to falsify a user-given DAG given observed data. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from dataclasses import dataclass, field from enum import Enum, auto from functools import pa...
eeulig
379f188d674d5be6d644559f9f54852b87403f7c
4e30c63fe1113e35259e7fb3400a6f09bca4d699
Wondering if there is really a use case where someone wants to use different data for the tests? To make things simpler, I would probably leave this as required and pass it to the methods. Or are there tests that do not require data (i.e., we cannot blindly pass it)?
bloebp
39
py-why/dowhy
967
Remove kwargs from falsify, improve docstrings
This commit updates `gcm/falsify` in the following ways: - Remove the `**kwargs` for `validate_graph` and `falsify_graph`. Instead, validation methods given to those functions should be wrapped in `wrap_partial`, e.g. if we want to validate a graph `G` and test local Markov conditions and pairwise dependencies on ob...
null
2023-07-04 13:58:30+00:00
2023-07-18 14:19:10+00:00
dowhy/gcm/falsify.py
"""This module provides functionality to falsify a user-given DAG given observed data. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from dataclasses import dataclass, field from enum import Enum, auto from functools import pa...
"""This module provides functionality to falsify a user-given DAG given observed data. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from dataclasses import dataclass, field from enum import Enum, auto from functools import pa...
eeulig
379f188d674d5be6d644559f9f54852b87403f7c
4e30c63fe1113e35259e7fb3400a6f09bca4d699
Isn't the `n_jobs` also method dependent or does every method expect this?
bloebp
40
py-why/dowhy
967
Remove kwargs from falsify, improve docstrings
This commit updates `gcm/falsify` in the following ways: - Remove the `**kwargs` for `validate_graph` and `falsify_graph`. Instead, validation methods given to those functions should be wrapped in `wrap_partial`, e.g. if we want to validate a graph `G` and test local Markov conditions and pairwise dependencies on ob...
null
2023-07-04 13:58:30+00:00
2023-07-18 14:19:10+00:00
dowhy/gcm/falsify.py
"""This module provides functionality to falsify a user-given DAG given observed data. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from dataclasses import dataclass, field from enum import Enum, auto from functools import pa...
"""This module provides functionality to falsify a user-given DAG given observed data. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from dataclasses import dataclass, field from enum import Enum, auto from functools import pa...
eeulig
379f188d674d5be6d644559f9f54852b87403f7c
4e30c63fe1113e35259e7fb3400a6f09bca4d699
Similar comments as for `validate_graph`.
bloebp
41
py-why/dowhy
967
Remove kwargs from falsify, improve docstrings
This commit updates `gcm/falsify` in the following ways: - Remove the `**kwargs` for `validate_graph` and `falsify_graph`. Instead, validation methods given to those functions should be wrapped in `wrap_partial`, e.g. if we want to validate a graph `G` and test local Markov conditions and pairwise dependencies on ob...
null
2023-07-04 13:58:30+00:00
2023-07-18 14:19:10+00:00
dowhy/gcm/falsify.py
"""This module provides functionality to falsify a user-given DAG given observed data. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from dataclasses import dataclass, field from enum import Enum, auto from functools import pa...
"""This module provides functionality to falsify a user-given DAG given observed data. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from dataclasses import dataclass, field from enum import Enum, auto from functools import pa...
eeulig
379f188d674d5be6d644559f9f54852b87403f7c
4e30c63fe1113e35259e7fb3400a6f09bca4d699
What about the following alternative: Remove all the method specific parameters here and set a default method partial function. This is, something like: ``` def validate_graph( causal_graph: DirectedGraph, methods=( wrap_partial(validate_lmc, data=data, independence_test=kernel_based, conditional_ind...
bloebp
42
py-why/dowhy
967
Remove kwargs from falsify, improve docstrings
This commit updates `gcm/falsify` in the following ways: - Remove the `**kwargs` for `validate_graph` and `falsify_graph`. Instead, validation methods given to those functions should be wrapped in `wrap_partial`, e.g. if we want to validate a graph `G` and test local Markov conditions and pairwise dependencies on ob...
null
2023-07-04 13:58:30+00:00
2023-07-18 14:19:10+00:00
dowhy/gcm/falsify.py
"""This module provides functionality to falsify a user-given DAG given observed data. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from dataclasses import dataclass, field from enum import Enum, auto from functools import pa...
"""This module provides functionality to falsify a user-given DAG given observed data. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from dataclasses import dataclass, field from enum import Enum, auto from functools import pa...
eeulig
379f188d674d5be6d644559f9f54852b87403f7c
4e30c63fe1113e35259e7fb3400a6f09bca4d699
Can you add this reference to the notebook as well in case it is not in there?
bloebp
43
py-why/dowhy
967
Remove kwargs from falsify, improve docstrings
This commit updates `gcm/falsify` in the following ways: - Remove the `**kwargs` for `validate_graph` and `falsify_graph`. Instead, validation methods given to those functions should be wrapped in `wrap_partial`, e.g. if we want to validate a graph `G` and test local Markov conditions and pairwise dependencies on ob...
null
2023-07-04 13:58:30+00:00
2023-07-18 14:19:10+00:00
dowhy/gcm/falsify.py
"""This module provides functionality to falsify a user-given DAG given observed data. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from dataclasses import dataclass, field from enum import Enum, auto from functools import pa...
"""This module provides functionality to falsify a user-given DAG given observed data. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from dataclasses import dataclass, field from enum import Enum, auto from functools import pa...
eeulig
379f188d674d5be6d644559f9f54852b87403f7c
4e30c63fe1113e35259e7fb3400a6f09bca4d699
Make this an internal function with `_`. Can you also add a docstring why we need this `wrap_partial` instead of `partial` directly (due to the `__name__` attribute). Maybe briefly explain how the `__name__` attribute is used there.
bloebp
44
py-why/dowhy
967
Remove kwargs from falsify, improve docstrings
This commit updates `gcm/falsify` in the following ways: - Remove the `**kwargs` for `validate_graph` and `falsify_graph`. Instead, validation methods given to those functions should be wrapped in `wrap_partial`, e.g. if we want to validate a graph `G` and test local Markov conditions and pairwise dependencies on ob...
null
2023-07-04 13:58:30+00:00
2023-07-18 14:19:10+00:00
dowhy/gcm/falsify.py
"""This module provides functionality to falsify a user-given DAG given observed data. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from dataclasses import dataclass, field from enum import Enum, auto from functools import pa...
"""This module provides functionality to falsify a user-given DAG given observed data. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from dataclasses import dataclass, field from enum import Enum, auto from functools import pa...
eeulig
379f188d674d5be6d644559f9f54852b87403f7c
4e30c63fe1113e35259e7fb3400a6f09bca4d699
`tpa` stands for parental triple. This is how we call it in the paper and I think this unifies it a bit. I explained it in the docstring now!
eeulig
45
py-why/dowhy
967
Remove kwargs from falsify, improve docstrings
This commit updates `gcm/falsify` in the following ways: - Remove the `**kwargs` for `validate_graph` and `falsify_graph`. Instead, validation methods given to those functions should be wrapped in `wrap_partial`, e.g. if we want to validate a graph `G` and test local Markov conditions and pairwise dependencies on ob...
null
2023-07-04 13:58:30+00:00
2023-07-18 14:19:10+00:00
dowhy/gcm/falsify.py
"""This module provides functionality to falsify a user-given DAG given observed data. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from dataclasses import dataclass, field from enum import Enum, auto from functools import pa...
"""This module provides functionality to falsify a user-given DAG given observed data. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from dataclasses import dataclass, field from enum import Enum, auto from functools import pa...
eeulig
379f188d674d5be6d644559f9f54852b87403f7c
4e30c63fe1113e35259e7fb3400a6f09bca4d699
Yes, the `validate_tpa` method doesn't require data. I now included an optional `data` argument there which is ignored, so that we can blindly pass it.
eeulig
46
py-why/dowhy
967
Remove kwargs from falsify, improve docstrings
This commit updates `gcm/falsify` in the following ways: - Remove the `**kwargs` for `validate_graph` and `falsify_graph`. Instead, validation methods given to those functions should be wrapped in `wrap_partial`, e.g. if we want to validate a graph `G` and test local Markov conditions and pairwise dependencies on ob...
null
2023-07-04 13:58:30+00:00
2023-07-18 14:19:10+00:00
dowhy/gcm/falsify.py
"""This module provides functionality to falsify a user-given DAG given observed data. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from dataclasses import dataclass, field from enum import Enum, auto from functools import pa...
"""This module provides functionality to falsify a user-given DAG given observed data. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from dataclasses import dataclass, field from enum import Enum, auto from functools import pa...
eeulig
379f188d674d5be6d644559f9f54852b87403f7c
4e30c63fe1113e35259e7fb3400a6f09bca4d699
I used `wrap_partial` because we needed the `__name__` attribute. I now included a `FalsifyConst.METHOD` key in the validation summary of each method so that this is not necessary anymore. Methods can now be simply wrapped using `partial`.
eeulig
47
py-why/dowhy
967
Remove kwargs from falsify, improve docstrings
This commit updates `gcm/falsify` in the following ways: - Remove the `**kwargs` for `validate_graph` and `falsify_graph`. Instead, validation methods given to those functions should be wrapped in `wrap_partial`, e.g. if we want to validate a graph `G` and test local Markov conditions and pairwise dependencies on ob...
null
2023-07-04 13:58:30+00:00
2023-07-18 14:19:10+00:00
dowhy/gcm/falsify.py
"""This module provides functionality to falsify a user-given DAG given observed data. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from dataclasses import dataclass, field from enum import Enum, auto from functools import pa...
"""This module provides functionality to falsify a user-given DAG given observed data. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import warnings from dataclasses import dataclass, field from enum import Enum, auto from functools import pa...
eeulig
379f188d674d5be6d644559f9f54852b87403f7c
4e30c63fe1113e35259e7fb3400a6f09bca4d699
I made data non-optional. Defining the default methods similar to how we do it for `validate_graph` now is a bit tricky though because of `causal_graph_reference` for `validate_tpa` and the p-value cache that is initialized after calling the function.
eeulig
48
py-why/dowhy
963
Removing autolguon as optional dependency
The autogluon models can still be used with DoWhy, but it is not listed as an optional dependency anymore to reduce the number of restrictions on other packages.
null
2023-06-22 14:55:47+00:00
2023-06-26 16:58:14+00:00
pyproject.toml
[tool.poetry] name = "dowhy" # # 0.0.0 is standard placeholder for poetry-dynamic-versioning # any changes to this should not be checked in # version = "0.0.0" description = "DoWhy is a Python library for causal inference that supports explicit modeling and testing of causal assumptions" authors = ["PyWhy Community <a...
[tool.poetry] name = "dowhy" # # 0.0.0 is standard placeholder for poetry-dynamic-versioning # any changes to this should not be checked in # version = "0.0.0" description = "DoWhy is a Python library for causal inference that supports explicit modeling and testing of causal assumptions" authors = ["PyWhy Community <a...
bloebp
21a37a9453d0a018318e16af22ffabab5d6d4fc6
a1c6c042ca5bdfba98063e78b348854cf1709307
`>=0.13.2,<1.0` isn't this the same as `^0.13.2` in poetry?
Zethson
49
py-why/dowhy
963
Removing autolguon as optional dependency
The autogluon models can still be used with DoWhy, but it is not listed as an optional dependency anymore to reduce the number of restrictions on other packages.
null
2023-06-22 14:55:47+00:00
2023-06-26 16:58:14+00:00
pyproject.toml
[tool.poetry] name = "dowhy" # # 0.0.0 is standard placeholder for poetry-dynamic-versioning # any changes to this should not be checked in # version = "0.0.0" description = "DoWhy is a Python library for causal inference that supports explicit modeling and testing of causal assumptions" authors = ["PyWhy Community <a...
[tool.poetry] name = "dowhy" # # 0.0.0 is standard placeholder for poetry-dynamic-versioning # any changes to this should not be checked in # version = "0.0.0" description = "DoWhy is a Python library for causal inference that supports explicit modeling and testing of causal assumptions" authors = ["PyWhy Community <a...
bloebp
21a37a9453d0a018318e16af22ffabab5d6d4fc6
a1c6c042ca5bdfba98063e78b348854cf1709307
I thought so too, but somehow it behaved slightly differently. Might be that it was something local, but just wanted to make sure :)
bloebp
50
py-why/dowhy
963
Removing autolguon as optional dependency
The autogluon models can still be used with DoWhy, but it is not listed as an optional dependency anymore to reduce the number of restrictions on other packages.
null
2023-06-22 14:55:47+00:00
2023-06-26 16:58:14+00:00
pyproject.toml
[tool.poetry] name = "dowhy" # # 0.0.0 is standard placeholder for poetry-dynamic-versioning # any changes to this should not be checked in # version = "0.0.0" description = "DoWhy is a Python library for causal inference that supports explicit modeling and testing of causal assumptions" authors = ["PyWhy Community <a...
[tool.poetry] name = "dowhy" # # 0.0.0 is standard placeholder for poetry-dynamic-versioning # any changes to this should not be checked in # version = "0.0.0" description = "DoWhy is a Python library for causal inference that supports explicit modeling and testing of causal assumptions" authors = ["PyWhy Community <a...
bloebp
21a37a9453d0a018318e16af22ffabab5d6d4fc6
a1c6c042ca5bdfba98063e78b348854cf1709307
we can change this to >=3.8,<3.12. the latest version of numba supports 3.11. can update line 45 too.
amit-sharma
51
py-why/dowhy
963
Removing autolguon as optional dependency
The autogluon models can still be used with DoWhy, but it is not listed as an optional dependency anymore to reduce the number of restrictions on other packages.
null
2023-06-22 14:55:47+00:00
2023-06-26 16:58:14+00:00
pyproject.toml
[tool.poetry] name = "dowhy" # # 0.0.0 is standard placeholder for poetry-dynamic-versioning # any changes to this should not be checked in # version = "0.0.0" description = "DoWhy is a Python library for causal inference that supports explicit modeling and testing of causal assumptions" authors = ["PyWhy Community <a...
[tool.poetry] name = "dowhy" # # 0.0.0 is standard placeholder for poetry-dynamic-versioning # any changes to this should not be checked in # version = "0.0.0" description = "DoWhy is a Python library for causal inference that supports explicit modeling and testing of causal assumptions" authors = ["PyWhy Community <a...
bloebp
21a37a9453d0a018318e16af22ffabab5d6d4fc6
a1c6c042ca5bdfba98063e78b348854cf1709307
Both should be fine! :)
amit-sharma
52
py-why/dowhy
943
Proposal: Finalize functional API refactor - deprecate causal graph
- The graph should now be defined via a networkx graph. Most identification methods now expect an additional "observed_nodes" parameter accordingly. - CausalModel and CausalGraph still exist and should be compatible with the old API. Open task is still to replace the usage of CausalModel in the tests and notebooks....
null
2023-05-16 16:07:18+00:00
2023-11-27 17:48:56+00:00
dowhy/causal_identifier/auto_identifier.py
import itertools import logging from enum import Enum from typing import Dict, List, Optional, Union import sympy as sp import sympy.stats as spstats from dowhy.causal_graph import CausalGraph from dowhy.causal_identifier.efficient_backdoor import EfficientBackdoor from dowhy.causal_identifier.identified_estimand imp...
import itertools import logging from enum import Enum from typing import Dict, List, Optional, Union import networkx as nx import sympy as sp import sympy.stats as spstats from dowhy.causal_identifier.efficient_backdoor import EfficientBackdoor from dowhy.causal_identifier.identified_estimand import IdentifiedEstiman...
bloebp
4fd0a92bd2fabbacfe6f225ea9637d3e8f08407e
2a8e49a77eb43a74d7ee6fc0925a376cd60335f2
nice, like the nomenclature of observed_nodes, action_nodes and outcome_nodes.
amit-sharma
53
py-why/dowhy
943
Proposal: Finalize functional API refactor - deprecate causal graph
- The graph should now be defined via a networkx graph. Most identification methods now expect an additional "observed_nodes" parameter accordingly. - CausalModel and CausalGraph still exist and should be compatible with the old API. Open task is still to replace the usage of CausalModel in the tests and notebooks....
null
2023-05-16 16:07:18+00:00
2023-11-27 17:48:56+00:00
dowhy/causal_identifier/auto_identifier.py
import itertools import logging from enum import Enum from typing import Dict, List, Optional, Union import sympy as sp import sympy.stats as spstats from dowhy.causal_graph import CausalGraph from dowhy.causal_identifier.efficient_backdoor import EfficientBackdoor from dowhy.causal_identifier.identified_estimand imp...
import itertools import logging from enum import Enum from typing import Dict, List, Optional, Union import networkx as nx import sympy as sp import sympy.stats as spstats from dowhy.causal_identifier.efficient_backdoor import EfficientBackdoor from dowhy.causal_identifier.identified_estimand import IdentifiedEstiman...
bloebp
4fd0a92bd2fabbacfe6f225ea9637d3e8f08407e
2a8e49a77eb43a74d7ee6fc0925a376cd60335f2
thanks for simplifying this function
amit-sharma
54
py-why/dowhy
943
Proposal: Finalize functional API refactor - deprecate causal graph
- The graph should now be defined via a networkx graph. Most identification methods now expect an additional "observed_nodes" parameter accordingly. - CausalModel and CausalGraph still exist and should be compatible with the old API. Open task is still to replace the usage of CausalModel in the tests and notebooks....
null
2023-05-16 16:07:18+00:00
2023-11-27 17:48:56+00:00
dowhy/causal_identifier/auto_identifier.py
import itertools import logging from enum import Enum from typing import Dict, List, Optional, Union import sympy as sp import sympy.stats as spstats from dowhy.causal_graph import CausalGraph from dowhy.causal_identifier.efficient_backdoor import EfficientBackdoor from dowhy.causal_identifier.identified_estimand imp...
import itertools import logging from enum import Enum from typing import Dict, List, Optional, Union import networkx as nx import sympy as sp import sympy.stats as spstats from dowhy.causal_identifier.efficient_backdoor import EfficientBackdoor from dowhy.causal_identifier.identified_estimand import IdentifiedEstiman...
bloebp
4fd0a92bd2fabbacfe6f225ea9637d3e8f08407e
2a8e49a77eb43a74d7ee6fc0925a376cd60335f2
to be consistent with naming, we can call it "mediator_nodes".
amit-sharma
55
py-why/dowhy
943
Proposal: Finalize functional API refactor - deprecate causal graph
- The graph should now be defined via a networkx graph. Most identification methods now expect an additional "observed_nodes" parameter accordingly. - CausalModel and CausalGraph still exist and should be compatible with the old API. Open task is still to replace the usage of CausalModel in the tests and notebooks....
null
2023-05-16 16:07:18+00:00
2023-11-27 17:48:56+00:00
dowhy/causal_identifier/efficient_backdoor.py
import networkx as nx import numpy as np EXCEPTION_NO_ADJ = "An adjustment set formed by observable variables does not exist" EXCEPTION_COND_NO_OPT = "Conditions to guarantee the existence of an optimal adjustment set are not satisfied" class EfficientBackdoor: """ Implements methods for finding optimal (eff...
from typing import List import networkx as nx import numpy as np EXCEPTION_NO_ADJ = "An adjustment set formed by observable variables does not exist" EXCEPTION_COND_NO_OPT = "Conditions to guarantee the existence of an optimal adjustment set are not satisfied" class EfficientBackdoor: """ Implements methods...
bloebp
4fd0a92bd2fabbacfe6f225ea9637d3e8f08407e
2a8e49a77eb43a74d7ee6fc0925a376cd60335f2
why not use `self.graph` in lines 48, 49? Not a strong preference since they are equivalent in the current code.
amit-sharma
56
py-why/dowhy
943
Proposal: Finalize functional API refactor - deprecate causal graph
- The graph should now be defined via a networkx graph. Most identification methods now expect an additional "observed_nodes" parameter accordingly. - CausalModel and CausalGraph still exist and should be compatible with the old API. Open task is still to replace the usage of CausalModel in the tests and notebooks....
null
2023-05-16 16:07:18+00:00
2023-11-27 17:48:56+00:00
dowhy/causal_identifier/id_identifier.py
from typing import Dict, List, Optional, Set, Union import networkx as nx import numpy as np from dowhy.causal_graph import CausalGraph from dowhy.utils.api import parse_state from dowhy.utils.graph_operations import find_ancestor, find_c_components, induced_graph from dowhy.utils.ordered_set import OrderedSet clas...
from typing import Dict, List, Optional, Set, Union import networkx as nx import numpy as np from dowhy.graph import get_adjacency_matrix from dowhy.utils.api import parse_state from dowhy.utils.graph_operations import find_ancestor, find_c_components, induced_graph from dowhy.utils.ordered_set import OrderedSet cl...
bloebp
4fd0a92bd2fabbacfe6f225ea9637d3e8f08407e
2a8e49a77eb43a74d7ee6fc0925a376cd60335f2
nice! good way to remove the node_names param
amit-sharma
57
py-why/dowhy
943
Proposal: Finalize functional API refactor - deprecate causal graph
- The graph should now be defined via a networkx graph. Most identification methods now expect an additional "observed_nodes" parameter accordingly. - CausalModel and CausalGraph still exist and should be compatible with the old API. Open task is still to replace the usage of CausalModel in the tests and notebooks....
null
2023-05-16 16:07:18+00:00
2023-11-27 17:48:56+00:00
dowhy/causal_identifier/identify_effect.py
from typing import List, Protocol, Union from dowhy.causal_graph import CausalGraph from dowhy.causal_identifier.auto_identifier import BackdoorAdjustment, EstimandType, identify_effect_auto from dowhy.causal_identifier.identified_estimand import IdentifiedEstimand class CausalIdentifier(Protocol): """ Proto...
from typing import List, Protocol, Union import networkx as nx from dowhy.causal_identifier.auto_identifier import BackdoorAdjustment, EstimandType, identify_effect_auto from dowhy.causal_identifier.identified_estimand import IdentifiedEstimand class CausalIdentifier(Protocol): """ Protocol to define a Caus...
bloebp
4fd0a92bd2fabbacfe6f225ea9637d3e8f08407e
2a8e49a77eb43a74d7ee6fc0925a376cd60335f2
can change "CausalGraph" to simply, "causal graph"
amit-sharma
58
py-why/dowhy
943
Proposal: Finalize functional API refactor - deprecate causal graph
- The graph should now be defined via a networkx graph. Most identification methods now expect an additional "observed_nodes" parameter accordingly. - CausalModel and CausalGraph still exist and should be compatible with the old API. Open task is still to replace the usage of CausalModel in the tests and notebooks....
null
2023-05-16 16:07:18+00:00
2023-11-27 17:48:56+00:00
dowhy/causal_identifier/identify_effect.py
from typing import List, Protocol, Union from dowhy.causal_graph import CausalGraph from dowhy.causal_identifier.auto_identifier import BackdoorAdjustment, EstimandType, identify_effect_auto from dowhy.causal_identifier.identified_estimand import IdentifiedEstimand class CausalIdentifier(Protocol): """ Proto...
from typing import List, Protocol, Union import networkx as nx from dowhy.causal_identifier.auto_identifier import BackdoorAdjustment, EstimandType, identify_effect_auto from dowhy.causal_identifier.identified_estimand import IdentifiedEstimand class CausalIdentifier(Protocol): """ Protocol to define a Caus...
bloebp
4fd0a92bd2fabbacfe6f225ea9637d3e8f08407e
2a8e49a77eb43a74d7ee6fc0925a376cd60335f2
good to change all mentions of CausalGraph in docs/comments to causal graph.
amit-sharma
59
py-why/dowhy
943
Proposal: Finalize functional API refactor - deprecate causal graph
- The graph should now be defined via a networkx graph. Most identification methods now expect an additional "observed_nodes" parameter accordingly. - CausalModel and CausalGraph still exist and should be compatible with the old API. Open task is still to replace the usage of CausalModel in the tests and notebooks....
null
2023-05-16 16:07:18+00:00
2023-11-27 17:48:56+00:00
dowhy/do_sampler.py
import logging import numpy as np import pandas as pd from dowhy.utils.api import parse_state class DoSampler: """Base class for a sampler from the interventional distribution.""" def __init__( self, data, params=None, variable_types=None, num_cores=1, causal_model=None, keep_original_treatment=Fal...
import logging from typing import List import networkx as nx import numpy as np import pandas as pd from dowhy import EstimandType, identify_effect_auto from dowhy.utils.api import parse_state class DoSampler: """Base class for a sampler from the interventional distribution.""" def __init__( self, ...
bloebp
4fd0a92bd2fabbacfe6f225ea9637d3e8f08407e
2a8e49a77eb43a74d7ee6fc0925a376cd60335f2
any specific reason you removed the `set_identifier_method` call?
amit-sharma
60
py-why/dowhy
943
Proposal: Finalize functional API refactor - deprecate causal graph
- The graph should now be defined via a networkx graph. Most identification methods now expect an additional "observed_nodes" parameter accordingly. - CausalModel and CausalGraph still exist and should be compatible with the old API. Open task is still to replace the usage of CausalModel in the tests and notebooks....
null
2023-05-16 16:07:18+00:00
2023-11-27 17:48:56+00:00
dowhy/do_sampler.py
import logging import numpy as np import pandas as pd from dowhy.utils.api import parse_state class DoSampler: """Base class for a sampler from the interventional distribution.""" def __init__( self, data, params=None, variable_types=None, num_cores=1, causal_model=None, keep_original_treatment=Fal...
import logging from typing import List import networkx as nx import numpy as np import pandas as pd from dowhy import EstimandType, identify_effect_auto from dowhy.utils.api import parse_state class DoSampler: """Base class for a sampler from the interventional distribution.""" def __init__( self, ...
bloebp
4fd0a92bd2fabbacfe6f225ea9637d3e8f08407e
2a8e49a77eb43a74d7ee6fc0925a376cd60335f2
I put it back in. I think my thought here was that the `identify_effect_auto` method should set the "identifier method", but I might mix something up here. Doesn't the `identify_effect_auto` select the identifier method (although it is currently by default the backdoor)?
bloebp
61
py-why/dowhy
925
Adding general version of CACM
This PR is the first step toward a general causal prediction API. The API supports _Causal, Independent, Confounded,_ and _Selected_ shifts (individual and multi-attribute settings) currently. The regularization has been implemented using `unconditional_reg` and `conditional_reg` functions, which can be used for the ge...
null
2023-04-18 10:36:38+00:00
2023-06-15 11:59:01+00:00
docs/source/example_notebooks/prediction/dowhy_causal_prediction_demo.ipynb
{ "cells": [ { "cell_type": "markdown", "id": "7a84e574", "metadata": {}, "source": [ "# Demo for DoWhy Causal Prediction on MNIST\n", "\n", "We're adding prediction functionality to DoWhy. The goal of this notebook is to demonstrate an example of causal prediction using *Causally Adaptive Co...
{ "cells": [ { "cell_type": "markdown", "id": "7a84e574", "metadata": {}, "source": [ "# Demo for DoWhy Causal Prediction on MNIST\n", "\n", "The goal of this notebook is to demonstrate an example of causal prediction using *Causally Adaptive Constraint Minimization (CACM)* (https://arxiv.org...
jivatneet
c87b511bfd95caec2bc50e4686ed21ca448e9c37
0fb1314c5ddaeb6805109453433ac6248063f3c5
can remove the first sentence: we're adding.. to dowhy"
amit-sharma
62
py-why/dowhy
925
Adding general version of CACM
This PR is the first step toward a general causal prediction API. The API supports _Causal, Independent, Confounded,_ and _Selected_ shifts (individual and multi-attribute settings) currently. The regularization has been implemented using `unconditional_reg` and `conditional_reg` functions, which can be used for the ge...
null
2023-04-18 10:36:38+00:00
2023-06-15 11:59:01+00:00
docs/source/example_notebooks/prediction/dowhy_causal_prediction_demo.ipynb
{ "cells": [ { "cell_type": "markdown", "id": "7a84e574", "metadata": {}, "source": [ "# Demo for DoWhy Causal Prediction on MNIST\n", "\n", "We're adding prediction functionality to DoWhy. The goal of this notebook is to demonstrate an example of causal prediction using *Causally Adaptive Co...
{ "cells": [ { "cell_type": "markdown", "id": "7a84e574", "metadata": {}, "source": [ "# Demo for DoWhy Causal Prediction on MNIST\n", "\n", "The goal of this notebook is to demonstrate an example of causal prediction using *Causally Adaptive Constraint Minimization (CACM)* (https://arxiv.org...
jivatneet
c87b511bfd95caec2bc50e4686ed21ca448e9c37
0fb1314c5ddaeb6805109453433ac6248063f3c5
add a link to CACM. And then move all references to the bottom of the notebook. This is to avoid interrupting the flow
amit-sharma
63
py-why/dowhy
925
Adding general version of CACM
This PR is the first step toward a general causal prediction API. The API supports _Causal, Independent, Confounded,_ and _Selected_ shifts (individual and multi-attribute settings) currently. The regularization has been implemented using `unconditional_reg` and `conditional_reg` functions, which can be used for the ge...
null
2023-04-18 10:36:38+00:00
2023-06-15 11:59:01+00:00
docs/source/example_notebooks/prediction/dowhy_causal_prediction_demo.ipynb
{ "cells": [ { "cell_type": "markdown", "id": "7a84e574", "metadata": {}, "source": [ "# Demo for DoWhy Causal Prediction on MNIST\n", "\n", "We're adding prediction functionality to DoWhy. The goal of this notebook is to demonstrate an example of causal prediction using *Causally Adaptive Co...
{ "cells": [ { "cell_type": "markdown", "id": "7a84e574", "metadata": {}, "source": [ "# Demo for DoWhy Causal Prediction on MNIST\n", "\n", "The goal of this notebook is to demonstrate an example of causal prediction using *Causally Adaptive Constraint Minimization (CACM)* (https://arxiv.org...
jivatneet
c87b511bfd95caec2bc50e4686ed21ca448e9c37
0fb1314c5ddaeb6805109453433ac6248063f3c5
what is ERM? expand the acronym and say that you are using it as a baseline
amit-sharma
64
py-why/dowhy
925
Adding general version of CACM
This PR is the first step toward a general causal prediction API. The API supports _Causal, Independent, Confounded,_ and _Selected_ shifts (individual and multi-attribute settings) currently. The regularization has been implemented using `unconditional_reg` and `conditional_reg` functions, which can be used for the ge...
null
2023-04-18 10:36:38+00:00
2023-06-15 11:59:01+00:00
docs/source/example_notebooks/prediction/dowhy_causal_prediction_demo.ipynb
{ "cells": [ { "cell_type": "markdown", "id": "7a84e574", "metadata": {}, "source": [ "# Demo for DoWhy Causal Prediction on MNIST\n", "\n", "We're adding prediction functionality to DoWhy. The goal of this notebook is to demonstrate an example of causal prediction using *Causally Adaptive Co...
{ "cells": [ { "cell_type": "markdown", "id": "7a84e574", "metadata": {}, "source": [ "# Demo for DoWhy Causal Prediction on MNIST\n", "\n", "The goal of this notebook is to demonstrate an example of causal prediction using *Causally Adaptive Constraint Minimization (CACM)* (https://arxiv.org...
jivatneet
c87b511bfd95caec2bc50e4686ed21ca448e9c37
0fb1314c5ddaeb6805109453433ac6248063f3c5
is there a way to avoid this verbose output? can you output a progress bar using tqdm?
amit-sharma
65
py-why/dowhy
925
Adding general version of CACM
This PR is the first step toward a general causal prediction API. The API supports _Causal, Independent, Confounded,_ and _Selected_ shifts (individual and multi-attribute settings) currently. The regularization has been implemented using `unconditional_reg` and `conditional_reg` functions, which can be used for the ge...
null
2023-04-18 10:36:38+00:00
2023-06-15 11:59:01+00:00
docs/source/example_notebooks/prediction/dowhy_causal_prediction_demo.ipynb
{ "cells": [ { "cell_type": "markdown", "id": "7a84e574", "metadata": {}, "source": [ "# Demo for DoWhy Causal Prediction on MNIST\n", "\n", "We're adding prediction functionality to DoWhy. The goal of this notebook is to demonstrate an example of causal prediction using *Causally Adaptive Co...
{ "cells": [ { "cell_type": "markdown", "id": "7a84e574", "metadata": {}, "source": [ "# Demo for DoWhy Causal Prediction on MNIST\n", "\n", "The goal of this notebook is to demonstrate an example of causal prediction using *Causally Adaptive Constraint Minimization (CACM)* (https://arxiv.org...
jivatneet
c87b511bfd95caec2bc50e4686ed21ca448e9c37
0fb1314c5ddaeb6805109453433ac6248063f3c5
This seems to be an issue with tqdm and jupyter, not PL (https://github.com/Lightning-AI/lightning/issues/330, https://github.com/Lightning-AI/lightning/issues/765). A potential solution I could see in these issues is using custom progress bar as a callback in Jupyter, but these don't seem to be working here.
jivatneet
66
py-why/dowhy
925
Adding general version of CACM
This PR is the first step toward a general causal prediction API. The API supports _Causal, Independent, Confounded,_ and _Selected_ shifts (individual and multi-attribute settings) currently. The regularization has been implemented using `unconditional_reg` and `conditional_reg` functions, which can be used for the ge...
null
2023-04-18 10:36:38+00:00
2023-06-15 11:59:01+00:00
docs/source/example_notebooks/prediction/dowhy_causal_prediction_demo.ipynb
{ "cells": [ { "cell_type": "markdown", "id": "7a84e574", "metadata": {}, "source": [ "# Demo for DoWhy Causal Prediction on MNIST\n", "\n", "We're adding prediction functionality to DoWhy. The goal of this notebook is to demonstrate an example of causal prediction using *Causally Adaptive Co...
{ "cells": [ { "cell_type": "markdown", "id": "7a84e574", "metadata": {}, "source": [ "# Demo for DoWhy Causal Prediction on MNIST\n", "\n", "The goal of this notebook is to demonstrate an example of causal prediction using *Causally Adaptive Constraint Minimization (CACM)* (https://arxiv.org...
jivatneet
c87b511bfd95caec2bc50e4686ed21ca448e9c37
0fb1314c5ddaeb6805109453433ac6248063f3c5
okay, it is fine then
amit-sharma
67
py-why/dowhy
925
Adding general version of CACM
This PR is the first step toward a general causal prediction API. The API supports _Causal, Independent, Confounded,_ and _Selected_ shifts (individual and multi-attribute settings) currently. The regularization has been implemented using `unconditional_reg` and `conditional_reg` functions, which can be used for the ge...
null
2023-04-18 10:36:38+00:00
2023-06-15 11:59:01+00:00
dowhy/causal_prediction/algorithms/cacm.py
import torch from torch import nn from torch.nn import functional as F from dowhy.causal_prediction.algorithms.base_algorithm import PredictionAlgorithm from dowhy.causal_prediction.algorithms.utils import mmd_compute class CACM(PredictionAlgorithm): def __init__( self, model, optimizer="...
import torch from torch import nn from torch.nn import functional as F from dowhy.causal_prediction.algorithms.base_algorithm import PredictionAlgorithm from dowhy.causal_prediction.algorithms.regularization import Regularizer class CACM(PredictionAlgorithm): def __init__( self, model, op...
jivatneet
c87b511bfd95caec2bc50e4686ed21ca448e9c37
0fb1314c5ddaeb6805109453433ac6248063f3c5
remove the commented code if not needed
amit-sharma
68
py-why/dowhy
925
Adding general version of CACM
This PR is the first step toward a general causal prediction API. The API supports _Causal, Independent, Confounded,_ and _Selected_ shifts (individual and multi-attribute settings) currently. The regularization has been implemented using `unconditional_reg` and `conditional_reg` functions, which can be used for the ge...
null
2023-04-18 10:36:38+00:00
2023-06-15 11:59:01+00:00
dowhy/causal_prediction/algorithms/cacm.py
import torch from torch import nn from torch.nn import functional as F from dowhy.causal_prediction.algorithms.base_algorithm import PredictionAlgorithm from dowhy.causal_prediction.algorithms.utils import mmd_compute class CACM(PredictionAlgorithm): def __init__( self, model, optimizer="...
import torch from torch import nn from torch.nn import functional as F from dowhy.causal_prediction.algorithms.base_algorithm import PredictionAlgorithm from dowhy.causal_prediction.algorithms.regularization import Regularizer class CACM(PredictionAlgorithm): def __init__( self, model, op...
jivatneet
c87b511bfd95caec2bc50e4686ed21ca448e9c37
0fb1314c5ddaeb6805109453433ac6248063f3c5
Added this to provide greater clarity on the variable shape. Can remove if you feel it's not needed.
jivatneet
69
py-why/dowhy
925
Adding general version of CACM
This PR is the first step toward a general causal prediction API. The API supports _Causal, Independent, Confounded,_ and _Selected_ shifts (individual and multi-attribute settings) currently. The regularization has been implemented using `unconditional_reg` and `conditional_reg` functions, which can be used for the ge...
null
2023-04-18 10:36:38+00:00
2023-06-15 11:59:01+00:00
dowhy/causal_prediction/algorithms/cacm.py
import torch from torch import nn from torch.nn import functional as F from dowhy.causal_prediction.algorithms.base_algorithm import PredictionAlgorithm from dowhy.causal_prediction.algorithms.utils import mmd_compute class CACM(PredictionAlgorithm): def __init__( self, model, optimizer="...
import torch from torch import nn from torch.nn import functional as F from dowhy.causal_prediction.algorithms.base_algorithm import PredictionAlgorithm from dowhy.causal_prediction.algorithms.regularization import Regularizer class CACM(PredictionAlgorithm): def __init__( self, model, op...
jivatneet
c87b511bfd95caec2bc50e4686ed21ca448e9c37
0fb1314c5ddaeb6805109453433ac6248063f3c5
Okay, it is good then.
amit-sharma
70
py-why/dowhy
918
Fix auto assign model unit test
null
null
2023-04-03 14:24:14+00:00
2023-04-03 15:38:01+00:00
tests/gcm/test_auto.py
import networkx as nx import numpy as np import pandas as pd from _pytest.python_api import approx from flaky import flaky from pytest import mark from sklearn.ensemble import HistGradientBoostingClassifier, HistGradientBoostingRegressor from sklearn.linear_model import ElasticNetCV, LassoCV, LinearRegression, Logistic...
import networkx as nx import numpy as np import pandas as pd from _pytest.python_api import approx from flaky import flaky from pytest import mark from sklearn.ensemble import HistGradientBoostingClassifier, HistGradientBoostingRegressor from sklearn.linear_model import ElasticNetCV, LassoCV, LinearRegression, Logistic...
bloebp
13ed13e8adf7a26a995b2e219103d7a25dacb426
5edb89192864d1684b5b2bde4eb86450a00b093e
Where does pipeline sneak in [here](https://github.com/py-why/dowhy/blob/main/dowhy/gcm/auto.py#L150)?
kailashbuki
71
py-why/dowhy
918
Fix auto assign model unit test
null
null
2023-04-03 14:24:14+00:00
2023-04-03 15:38:01+00:00
tests/gcm/test_auto.py
import networkx as nx import numpy as np import pandas as pd from _pytest.python_api import approx from flaky import flaky from pytest import mark from sklearn.ensemble import HistGradientBoostingClassifier, HistGradientBoostingRegressor from sklearn.linear_model import ElasticNetCV, LassoCV, LinearRegression, Logistic...
import networkx as nx import numpy as np import pandas as pd from _pytest.python_api import approx from flaky import flaky from pytest import mark from sklearn.ensemble import HistGradientBoostingClassifier, HistGradientBoostingRegressor from sklearn.linear_model import ElasticNetCV, LassoCV, LinearRegression, Logistic...
bloebp
13ed13e8adf7a26a995b2e219103d7a25dacb426
5edb89192864d1684b5b2bde4eb86450a00b093e
Here: https://github.com/py-why/dowhy/blob/main/dowhy/gcm/ml/regression.py#L121 It adds polynomial features, which can be equally good as a linear model when the coefficients are zero accordingly.
bloebp
72
py-why/dowhy
913
Add method to estimate ICC for single samples
Before, it was only possible to estimate intrinsic causal contributions with respect to the distribution. This new method allows to estimate the influences of upstream nodes on a particular observation of a target node. As for now, this requires that all models are invertible with respect to the noise.
null
2023-03-29 21:42:31+00:00
2023-03-31 13:39:16+00:00
dowhy/gcm/influence.py
"""This module provides functions to estimate causal influences. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging import warnings from typing import Any, Callable, Dict, List, Optional, Tuple, Union, cast import numpy as np impor...
"""This module provides functions to estimate causal influences. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging import warnings from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Union, cast import numpy a...
bloebp
45046e141ebd701820ca8a692c8f03ed5dce314c
e734f4e6245d404218b0ba11b14f7cc621bec7a0
One statement
petergtz
73
py-why/dowhy
913
Add method to estimate ICC for single samples
Before, it was only possible to estimate intrinsic causal contributions with respect to the distribution. This new method allows to estimate the influences of upstream nodes on a particular observation of a target node. As for now, this requires that all models are invertible with respect to the noise.
null
2023-03-29 21:42:31+00:00
2023-03-31 13:39:16+00:00
dowhy/gcm/influence.py
"""This module provides functions to estimate causal influences. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging import warnings from typing import Any, Callable, Dict, List, Optional, Tuple, Union, cast import numpy as np impor...
"""This module provides functions to estimate causal influences. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging import warnings from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Union, cast import numpy a...
bloebp
45046e141ebd701820ca8a692c8f03ed5dce314c
e734f4e6245d404218b0ba11b14f7cc621bec7a0
Can we use type hints here?
petergtz
74
py-why/dowhy
913
Add method to estimate ICC for single samples
Before, it was only possible to estimate intrinsic causal contributions with respect to the distribution. This new method allows to estimate the influences of upstream nodes on a particular observation of a target node. As for now, this requires that all models are invertible with respect to the noise.
null
2023-03-29 21:42:31+00:00
2023-03-31 13:39:16+00:00
dowhy/gcm/influence.py
"""This module provides functions to estimate causal influences. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging import warnings from typing import Any, Callable, Dict, List, Optional, Tuple, Union, cast import numpy as np impor...
"""This module provides functions to estimate causal influences. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging import warnings from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Union, cast import numpy a...
bloebp
45046e141ebd701820ca8a692c8f03ed5dce314c
e734f4e6245d404218b0ba11b14f7cc621bec7a0
Put this at the top as ```python if isinstance(prediction_model, str) and prediction_model not in ("approx", "exact") ```
petergtz
75
py-why/dowhy
913
Add method to estimate ICC for single samples
Before, it was only possible to estimate intrinsic causal contributions with respect to the distribution. This new method allows to estimate the influences of upstream nodes on a particular observation of a target node. As for now, this requires that all models are invertible with respect to the noise.
null
2023-03-29 21:42:31+00:00
2023-03-31 13:39:16+00:00
dowhy/gcm/influence.py
"""This module provides functions to estimate causal influences. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging import warnings from typing import Any, Callable, Dict, List, Optional, Tuple, Union, cast import numpy as np impor...
"""This module provides functions to estimate causal influences. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging import warnings from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Union, cast import numpy a...
bloebp
45046e141ebd701820ca8a692c8f03ed5dce314c
e734f4e6245d404218b0ba11b14f7cc621bec7a0
directly return this.
petergtz
76
py-why/dowhy
913
Add method to estimate ICC for single samples
Before, it was only possible to estimate intrinsic causal contributions with respect to the distribution. This new method allows to estimate the influences of upstream nodes on a particular observation of a target node. As for now, this requires that all models are invertible with respect to the noise.
null
2023-03-29 21:42:31+00:00
2023-03-31 13:39:16+00:00
dowhy/gcm/influence.py
"""This module provides functions to estimate causal influences. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging import warnings from typing import Any, Callable, Dict, List, Optional, Tuple, Union, cast import numpy as np impor...
"""This module provides functions to estimate causal influences. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging import warnings from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Union, cast import numpy a...
bloebp
45046e141ebd701820ca8a692c8f03ed5dce314c
e734f4e6245d404218b0ba11b14f7cc621bec7a0
dito
petergtz
77
py-why/dowhy
913
Add method to estimate ICC for single samples
Before, it was only possible to estimate intrinsic causal contributions with respect to the distribution. This new method allows to estimate the influences of upstream nodes on a particular observation of a target node. As for now, this requires that all models are invertible with respect to the noise.
null
2023-03-29 21:42:31+00:00
2023-03-31 13:39:16+00:00
dowhy/gcm/influence.py
"""This module provides functions to estimate causal influences. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging import warnings from typing import Any, Callable, Dict, List, Optional, Tuple, Union, cast import numpy as np impor...
"""This module provides functions to estimate causal influences. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging import warnings from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Union, cast import numpy a...
bloebp
45046e141ebd701820ca8a692c8f03ed5dce314c
e734f4e6245d404218b0ba11b14f7cc621bec7a0
this can now be a simple if
petergtz
78
py-why/dowhy
913
Add method to estimate ICC for single samples
Before, it was only possible to estimate intrinsic causal contributions with respect to the distribution. This new method allows to estimate the influences of upstream nodes on a particular observation of a target node. As for now, this requires that all models are invertible with respect to the noise.
null
2023-03-29 21:42:31+00:00
2023-03-31 13:39:16+00:00
dowhy/gcm/influence.py
"""This module provides functions to estimate causal influences. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging import warnings from typing import Any, Callable, Dict, List, Optional, Tuple, Union, cast import numpy as np impor...
"""This module provides functions to estimate causal influences. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging import warnings from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Union, cast import numpy a...
bloebp
45046e141ebd701820ca8a692c8f03ed5dce314c
e734f4e6245d404218b0ba11b14f7cc621bec7a0
else is not needed anymore See also: [Why You Shouldn't Nest Your Code ](https://www.youtube.com/watch?v=CFRhGnuXG-4) Oh, just saw: this code was actually just moved. Feel free to postpone my proposed refactoring. Either way you choose, I think it's worth doing it.
petergtz
79
py-why/dowhy
913
Add method to estimate ICC for single samples
Before, it was only possible to estimate intrinsic causal contributions with respect to the distribution. This new method allows to estimate the influences of upstream nodes on a particular observation of a target node. As for now, this requires that all models are invertible with respect to the noise.
null
2023-03-29 21:42:31+00:00
2023-03-31 13:39:16+00:00
dowhy/gcm/influence.py
"""This module provides functions to estimate causal influences. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging import warnings from typing import Any, Callable, Dict, List, Optional, Tuple, Union, cast import numpy as np impor...
"""This module provides functions to estimate causal influences. Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import logging import warnings from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Union, cast import numpy a...
bloebp
45046e141ebd701820ca8a692c8f03ed5dce314c
e734f4e6245d404218b0ba11b14f7cc621bec7a0
return this directly
petergtz
80
py-why/dowhy
896
Change default parameter for estimating continous KL divergence
This should reduce variance in the estimation, increase runtime and, generally, accuracy.
null
2023-03-13 21:42:18+00:00
2023-03-15 19:04:17+00:00
dowhy/gcm/divergence.py
"""Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import numpy as np from scipy.stats import entropy from sklearn.neighbors import NearestNeighbors from dowhy.gcm.constant import EPS from dowhy.gcm.util.general import is_categorical, shape_int...
"""Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import numpy as np from scipy.stats import entropy from sklearn.neighbors import NearestNeighbors from dowhy.gcm.constant import EPS from dowhy.gcm.util.general import is_categorical, setdiff2...
bloebp
b8fb120033656688621477768fc7002aba4d3601
58f314c81c98c4e417b49fce990c82f1c535fe42
BTW, there is an elegant construct in Python for this: ```python X, Y = setdiff2d(X, Y, assume_unique=True), setdiff2d(Y, X, assume_unique=True) ```
petergtz
81
py-why/dowhy
896
Change default parameter for estimating continous KL divergence
This should reduce variance in the estimation, increase runtime and, generally, accuracy.
null
2023-03-13 21:42:18+00:00
2023-03-15 19:04:17+00:00
dowhy/gcm/util/general.py
"""Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import random from typing import Dict import numpy as np from scipy.optimize import minimize from sklearn.preprocessing import OneHotEncoder def shape_into_2d(*args): """If necessary, sh...
"""Functions in this module should be considered experimental, meaning there might be breaking API changes in the future. """ import random from typing import Dict import numpy as np from scipy.optimize import minimize from sklearn.preprocessing import OneHotEncoder def shape_into_2d(*args): """If necessary, sh...
bloebp
b8fb120033656688621477768fc7002aba4d3601
58f314c81c98c4e417b49fce990c82f1c535fe42
Every local variable is temporary ;-). Just `dtype`?
petergtz
82
py-why/dowhy
882
Revise user guide entry for intrinsic causal influence
null
null
2023-02-24 21:36:44+00:00
2023-03-07 16:13:45+00:00
docs/source/user_guide/gcm_based_inference/answering_causal_questions/quantify_intrinsic_causal_influence.rst
Quantifying Intrinsic Causal Influence ====================================== By quantifying intrinsic causal influence, we answer the question: How strong is the causal influence of a source node to a target node that is not inherited from the parents of the source node? Naturally, descendants will have a z...
Quantifying Intrinsic Causal Influence ====================================== By quantifying intrinsic causal influence, we answer the question: How strong is the causal influence of a source node to a target node that is not inherited from the parents of the source node? Naturally, descendants will have a z...
bloebp
a1dcccbc805cb28aa4840fe9bce8338278632a50
12168ea7bd7a30d4c0d6501f69c7161ddb073845
Do X, Y, Z represent **delays**? If so, then delays can also be negative, trains may arrive faster than usual. A realistic distribution would then be a Gaussian distribution which has a non-zero mean with negative observations ~3 standard deviations away.
kailashbuki
83