FenTechSolutions / CausalDiscoveryToolbox

Package for causal inference in graphs and in the pairwise settings. Tools for graph structure recovery and dependencies are included.
https://fentechsolutions.github.io/CausalDiscoveryToolbox/html/index.html
MIT License
1.12k stars 198 forks source link

import error when importing cdt.causality.pairwise.ANM #55

Closed maffos closed 4 years ago

maffos commented 4 years ago

When importing the ANM package from cdt.causality.pairwise, I got the following error message:" ImportError: cannot import name 'GraphLasso'". Which is a function from the sklearn.covariance package. I checked the sklearn documentation and the function is apparently only documented for version 0.11. I tried to pip install this older version of sklearn, but got the error message:" ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output." Which has apparently something to do with conversion from python2 to python3. So my guess is, that GraphLasso is not supported anymore for new versions of sklearn.

I use python 3.6.8 in a virtual environment. My Pytorch version is 1.3.1 My sklearn version is 0.22

I haven't tried running in a docker image, because I am new to docker. Any help would be much appreciated.

Matthias

maffos commented 4 years ago

Ok so I updated sklearn to version 0.20.3 and that works. As mentioned here: https://scikit-learn.org/stable/whats_new/v0.20.html?highlight=graphlasso GraphLasso was removed as of 0.22.

diviyank commented 4 years ago

This issue will be addressed in order to keep all packages up to date

diviyank commented 4 years ago

The package should be up to date with the latest upcoming version. Thank you !