diff --git a/bnlearn/__init__.py b/bnlearn/__init__.py index ac63d03..813679e 100644 --- a/bnlearn/__init__.py +++ b/bnlearn/__init__.py @@ -38,7 +38,7 @@ __author__ = 'Erdogan Tasksen' __email__ = 'erdogant@gmail.com' -__version__ = '0.8.4' +__version__ = '0.8.5' import pgmpy # Check version pgmpy @@ -48,19 +48,23 @@ # Version check import matplotlib if not version.parse(matplotlib.__version__) >= version.parse("3.3.4"): - raise ImportError('[bnlearn] >Error: Matplotlib version should be >= v3.3.4.\nTry to: pip install -U matplotlib') + raise ImportError('[bnlearn] >Error: Matplotlib version should be >= v3.3.4\nTry to: pip install -U matplotlib') import networkx as nx if not version.parse(nx.__version__) >= version.parse("2.7.1"): - raise ImportError('[bnlearn] >Error: networkx version should be > 2.7.1.\nTry to: pip install -U networkx') + raise ImportError('[bnlearn] >Error: networkx version should be > 2.7.1\nTry to: pip install -U networkx') import numpy as np if not version.parse(np.__version__) >= version.parse("1.24.1"): - raise ImportError('[bnlearn] >Error: numpy version should be > 1.24.1.\nTry to: pip install -U numpy') + raise ImportError('[bnlearn] >Error: numpy version should be > 1.24.1\nTry to: pip install -U numpy') import pandas as pd if not version.parse(pd.__version__) <= version.parse("1.5.3"): - raise ImportError('[bnlearn] >Error: pands version should be <= 1.5.3.') + raise ImportError('[bnlearn] >Error: pands version should be <= 1.5.3') + +import d3blocks as d3 +if not version.parse(d3.__version__) <= version.parse("1.4.9"): + raise ImportError('[bnlearn] >Error: d3blocks version should be >= 1.4.9') # module level doc-string __doc__ = """ diff --git a/bnlearn/examples.py b/bnlearn/examples.py index bf9767d..f467d7c 100644 --- a/bnlearn/examples.py +++ b/bnlearn/examples.py @@ -1,10 +1,10 @@ import bnlearn as bn # Load asia DAG -model_true = bn.import_DAG('asia') +model = bn.import_DAG('asia') # plot ground truth -G = bn.plot(model_true) +G = bn.plot(model) -Gi = bn.plot(model_true, interactive=True) +Gi = bn.plot(model, interactive=True) # %% issue plot static vs dynamic is different import bnlearn as bn diff --git a/requirements.txt b/requirements.txt index a2e76a8..b836725 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,6 +3,7 @@ networkx>='2.7.1' matplotlib>='3.3.4' numpy>='1.24.1' pandas==1.5.3 +d3blocks>='1.4.9' tqdm ismember scikit-learn diff --git a/setup.py b/setup.py index d5f8a96..f24c945 100644 --- a/setup.py +++ b/setup.py @@ -18,6 +18,7 @@ "matplotlib>=3.3.4", "numpy>=1.24.1", 'pandas==1.5.3', + 'd3blocks>=1.4.9', 'tqdm', 'ismember', 'scikit-learn',