erdogant / bnlearn

Python package for Causal Discovery by learning the graphical structure of Bayesian networks. Structure Learning, Parameter Learning, Inferences, Sampling methods.
https://erdogant.github.io/bnlearn
Other
482 stars 46 forks source link

import issue, version compatibility #86

Closed MenigStar91 closed 1 month ago

MenigStar91 commented 1 year ago

The current code of bnlearn is not compatible with the latest numpy version. Could we have it updated or contribute?

erdogant commented 1 year ago

I could not reproduce an error using numpy. Can you show by example how it occurs to you? A contributing would be great 👍🏻

MenigStar91 commented 1 year ago

While there shows no error in pip install bnlearn, import bnlearn returns some issue when using with the latest version of numpy. image after reinstalling numpy (older version) the command runs fine. image Similar issue happens if we try importing on desktop.

erdogant commented 1 year ago

Can you also try to install it from pypi? pip install -U bnlearn

MenigStar91 commented 1 year ago

its the same issue, whichever of the 3ways we use to install it.

On Wed, 25 Oct, 2023, 11:24 pm Erdogan, @.***> wrote:

Can you also try to install it from pypi? pip install -U bnlearn

— Reply to this email directly, view it on GitHub https://github.com/erdogant/bnlearn/issues/86#issuecomment-1779776279, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASJOVXSHWUPHD5HXS4VG5ZDYBFG5RAVCNFSM6AAAAAA6KQG4ROVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZZG43TMMRXHE . You are receiving this because you authored the thread.Message ID: @.***>

erdogant commented 1 year ago

I was able to reproduce the error. In my case it was fixed when updating to the correct numpy version. fix_bug_numpy_error_bnlearn

vin2015-edem commented 1 year ago

Thanks @erdogant for the advice, but unfortunately, it won't help me in Kaggle as restarting rolls everything back.

pip install -U bnlearn - didn't help either

And I still can't use my Kaggle notebook on different my dataset. I had to prepare the data in Python, save it in .csv, and then read it in the R notebook and build a Bayesian network there - everything works in R.

If it is not fixed, you will have to learn some other library

erdogant commented 1 month ago

I'm not sure whether this issue has solved itself, but I am closing it. Let me know if it remains an issue. Hopefully, time has fixed something. Otherwise, reopen again plz.