davenza / PyBNesian

PyBNesian is a Python package that implements Bayesian networks.
MIT License
38 stars 10 forks source link

Running pybnesian in 2024 #5

Open jrzkaminski opened 7 months ago

jrzkaminski commented 7 months ago

Hello! If someone ever considers to return to this package, please, keep in mind that apache change: - BitUtil namespace has been renamed to bit_utls

So the code won't be compiled with modern apache arrow versions. I'd say go with <=9.0.0

Also, callbacks do not work if pybnesian is installed from pip, python does not see package modules like learning or models. I've managed to compile the library from source on arch linux with python 3.8.18, clang 16.0.6-1 and these python libraries:

numpy==1.24.4
pandas==2.0.3
pyarrow==3.0.0
pybind11==2.11.1
pybnesian==0.0.1
python-dateutil==2.8.2
pytz==2023.3.post1
scipy==1.10.1
six==1.16.0
tzdata==2023.4

And if you encounter RuntimeError: OpenCL platforms not found., please install OpenCL for you Nvidia, AMD GPU or intel, amd CPU

If you are using conda, please see: https://stackoverflow.com/questions/72540359/glibcxx-3-4-30-not-found-for-librosa-in-conda-virtual-environment-after-tryin

yfpeng1234 commented 2 months ago

Hi Jerzy, thanks much for sharing this. Actually I'm trying to build structure learning algorithm for hybrid DBN and I found this repo has implemented this. But it was implemented in C++ which I am not very familiar with. Could you recommend some other python library? @jrzkaminski

jrzkaminski commented 2 months ago

@yfpeng1234 Hello! As far as I know causalnex has some implementation of DBNs, however, it is not fully featured, lacks different structure learning algorithms and so on. We are going to release some implementation of DBN in our BAMT package in 1-2 months or so.

yfpeng1234 commented 2 months ago

Hi @jrzkaminski ! Thanks so much for your prompt reply. Your suggestion is really helpful to me and look forward to your project. By the way, I also found that PyBNesian has implemented heterogenous BN type(for mixing discrete and continous variables) and dynamic bayesian network.