Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

graph learning and R depedency on CDT #1021

Open
priamai opened this issue Aug 23, 2023 · 9 comments
Open

graph learning and R depedency on CDT #1021

priamai opened this issue Aug 23, 2023 · 9 comments
Labels
enhancement New feature or request

Comments

@priamai
Copy link

priamai commented Aug 23, 2023

In the documentation the causal learning depends on an external library CDT:

The CDT library is quite cumbersome to install since it relies on the R environment and a bunch of R libraries.
In the documentation I can see this:

https://www.pywhy.org/dowhy/v0.10/dowhy.graph_learners.html

which seems to be a wrapper still on CDT.

Are there are any plans to implement a full python module and avoid using R?

@priamai priamai added the enhancement New feature or request label Aug 23, 2023
@priamai
Copy link
Author

priamai commented Aug 23, 2023

I can see that for example the GES sampler is both available via the python pure package and in the CDT package.

@emrekiciman
Copy link
Member

emrekiciman commented Aug 23, 2023

Hi @priamai , thanks for the question. Causal-Learn, another of the pywhy libraries, provides a broad set of causal discovery methods. Does that provide what you are looking for?

https://github.com/py-why/causal-learn

It would be great to update that sample notebook to use causal-learn instead of CDT. It is an old example.

@amit-sharma
Copy link
Member

ah yes, we should update that example and use causal-learn.

@kunwuz would you like to update this notebook and add causal-learn algorithms?

@priamai
Copy link
Author

priamai commented Aug 24, 2023

That will be awesome!

@kunwuz
Copy link
Contributor

kunwuz commented Aug 24, 2023

Aha yes, I will update this notebook soon. At the same time, please feel free to let me know if you have any questions using causal-learn.

@priamai
Copy link
Author

priamai commented Aug 24, 2023

I have one question @kunwuz, I notice there are also conditional independence test which we also have in DoWhy correct?
This link: https://www.cmu.edu/dietrich/causality/ seems to timeout for me, can you access it (I managed it took ages to load)?
They have some really good datasets here: https://github.com/cmu-phil/example-causal-datasets
Would be great to show how to run the discovery on each one?

@kunwuz
Copy link
Contributor

kunwuz commented Aug 24, 2023

Can you access this link? https://www.cmu.edu/dietrich/causality/projects/causal_learn_benchmarks/ It works from my side. And yes, cmu-phil has a lot of well-maintained/processed datasets, and I will try to write up a tutorial on applying discovery methods on them. Of course, I will let you know when I finish it.

@kunwuz
Copy link
Contributor

kunwuz commented Aug 24, 2023

Causal-learn has a series of conditional independence tests, including fisher-z, chi-square, kernel-based tests, and others. The kernel-based tests have also been used in dowhy-gcm. In a recent package called pywhy-stat, a more complete collection of tests has been integrated, although still in process.

@priamai
Copy link
Author

priamai commented Sep 4, 2023

Hello yes,
I am building a graph itself to document all the various frameworks with an initial taxonomy, it would be nice if you could contribute to it here I can make you an author.

With causa-learn one of the main issues to use with pandas data frames is that it requires numpy and thus requires to keep some form of mapping between the column names.

Here's a practical example:

image

It would be nice if you could facilitate this kind of translation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants