erdogant / bnlearn

Python library for learning the graphical structure of Bayesian networks, parameter learning, inference and sampling methods.
https://erdogant.github.io/bnlearn
Other
463 stars 45 forks source link

import issue, version compatibility #86

Open MenigStar91 opened 10 months ago

MenigStar91 commented 10 months ago

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

erdogant commented 10 months 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 10 months 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 10 months ago

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

MenigStar91 commented 10 months 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 10 months 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 10 months 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