bnlearn

Python library for learning the graphical structure of Bayesian networks, parameter learning, inference and sampling methods.

OTHER License

Downloads
10.3K
Stars
447
Committers
8
bnlearn - 0.8.8 Latest Release

Published by erdogant 5 months ago

  • Latest version of pandas is supported again.
bnlearn - 0.8.7

Published by erdogant 7 months ago

  • Fix for showing the weights in the edges for the static plot
bnlearn - 0.8.6

Published by erdogant 7 months ago

  • Fix for issue #99
  • Removed d3blocks from setup /requirements and added it as check when using the interactive plot functionality
bnlearn - 0.8.5

Published by erdogant 8 months ago

  • add d3blocks to setup and requirements with minimum version. The wrong version can break the interactive plots.
bnlearn - v0.8.4

Published by erdogant 12 months ago

  • Fix the issue, sorting the continuous_columns in the correct order when discretizing continuous data @ankh1999
bnlearn - v0.8.3

Published by erdogant 12 months ago

  • Fix for the dynamic plot. #89 The labels are now correctly shown again.
  • Fix for when calling the .predict method. #87 Many thanks to @ankh1999
bnlearn - v0.8.2

Published by erdogant over 1 year ago

  • fix for recursive model check
bnlearn - v0.8.1

Published by erdogant over 1 year ago

  • Removed lowering of pathname in the import_DAG function.

  • Added new scoring method: BDS and AIC

  • Created groupby functionality for inferences that allows grouping similar categories.

  • Auto-convert non-numerical columns into numerical when discretizing

  • Code refactoring

  • Small improvements docstrings

bnlearn - v0.8.0

Published by erdogant over 1 year ago

I am really happy to announce the following new great functionalities in bnlearn!

  • Continuous data modeling is possible using the approach of Yi-Chun Chen et al.
  • Interactive plots are created using D3Blocks which provides more flexibility.
  • Data examples and functions are removed from bnlearn and are now imported from datazets library.
  • Unit tests updated and new ones implemented

Especially for the plot functionality, some of the input parameters are changed.
See the docs for continuous data modeling

bnlearn - v0.7.16

Published by erdogant over 1 year ago

  • fix for disabling verbose message
bnlearn - v0.7.15

Published by erdogant over 1 year ago

  • Freeze pandas package to 1.5.3 because of error in iteritems that is used in underlying pgmpy package.
  • A huge new implementation with new functionalities but this needs to be documented first.
bnlearn - v0.7.14

Published by erdogant over 1 year ago

  • added library requests
bnlearn - v0.7.13

Published by erdogant over 1 year ago

  • Fix for import examples (requires latest numpy version)
  • replaced wget with internal python function.
bnlearn - v0.7.12

Published by erdogant almost 2 years ago

  • Added cdn resources to fix interactive plot in jupyter notebook and Colab
bnlearn - v0.7.11

Published by erdogant almost 2 years ago

  • Fix for interactive plot. It did not show up correctly but now it does again.
bnlearn - v0.7.10

Published by erdogant almost 2 years ago

  • sklearn is changed to scikit-learn in the setup and requirements (issue #66 )
bnlearn - v0.7.9

Published by erdogant almost 2 years ago

  • plot function bn.plot(model) return figure axis.
  • Setup file contains import of python-louvain instead of community
  • docstring updates regarding this output.

Example:

model = bn.import_DAG('sprinkler', CPD=True)
df = bn.sampling(model, n=1000, methodtype='bayes')
fig = bn.plot(model)
fig['ax']

bnlearn - v0.7.8

Published by erdogant about 2 years ago

  • Added functionality to compute sctructure scores when using parameter of structure learning. This can help to decide which scoring type may give a better fit ('bic', 'k2', 'bdeu'). The results scores are directly stored in the output.
import bnlearn as bn

# Load example dataset
df = bn.import_example('sprinkler')

edges = [('Cloudy', 'Sprinkler'),
         ('Cloudy', 'Rain'),
         ('Sprinkler', 'Wet_Grass'),
         ('Rain', 'Wet_Grass')]

# Make the actual Bayesian DAG
DAG = bn.make_DAG(edges)
model = bn.parameter_learning.fit(DAG, df)

model['structure_scores']
{'k2': -33962.61414408797,
 'bds': -57992.919156623604,
 'bic': -94337.69274492635,
 'bdeu': -33670.95375881856}

bnlearn - v0.7.7

Published by erdogant about 2 years ago

  • check_model now uses Decimals to prevent Floating Point Errors in the checks: Issue #60.
bnlearn - v0.7.6

Published by erdogant about 2 years ago

  • CPDs are now returned from print_CPD for further usage.