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.4.4

Published by erdogant about 3 years ago

bnlearn - 0.4.3

Published by erdogant about 3 years ago

  • Added licence to setup
bnlearn - 0.4.2

Published by erdogant about 3 years ago

update to the latest version with:
pip install -U bnlearn

bnlearn - 0.4.1

Published by erdogant about 3 years ago

  • added interactive plot with pyvis using the plot functionality with parameter bn.plot(model, interactive=True)
import bnlearn as bn
df = bn.import_example()
# Structure learning
model = bn.structure_learning.fit(df)
bn.plot(model, interactive=True)

bnlearn - 0.4.0

Published by erdogant about 3 years ago

  • Included fixed_edges when using methodtype='hc'
  • Changed the bw_list_method for clarity.
    • bw_list_method='enforce' into bw_list_method='edges'
    • bw_list_method='filter' into bw_list_method='nodes'
  • Some docstring updates
  • Some code cleaning

Note that bw_list_method='nodes' works for all methodtypes and bw_list_method='edges' only when methodtype='hc'

bnlearn - 0.3.22

Published by erdogant about 3 years ago

  • Added new tree search based structure learning method: Tree-augmented Naive Bayes (TAN)

Example

import bnlearn as bn
df = bn.import_example()
# Structure learning with TAN
model = bn.structure_learning.fit(df, methodtype='tan', root_node='Cloudy', class_node='Rain')
bn.plot(model)

bnlearn - 0.3.21

Published by erdogant over 3 years ago

  • Fix for scoring_method that occured in newer versions from pgmpy/python
  • Fix for return_type in forward_sampling
  • removed examples from library and included functionality to auto-download
  • Update of requirements
  • Update unit test
  • Some code refactoring
bnlearn - 0.3.20

Published by erdogant over 3 years ago

  • Functionally added to make predictions on dataset with the predict function #17
  • Predict examples can be found in the readme and sphinx pages: https://erdogant.github.io/bnlearn/pages/html/Predict.html
  • Functionally added that outputs a dataframe with the results for the inference that is made (query2df)
  • Included some exceptions to catch errors
  • Fixed circular imports
  • Unit test updated for the new functions
  • Some docstrings updated
  • Some code refactoring and cleaning
bnlearn - 0.3.19

Published by erdogant over 3 years ago

bnlearn - 0.3.18

Published by erdogant over 3 years ago

  • Fix for the maximum likelihood estimation in parameter learning using the model.fit approach (thanks to ssomanch)
bnlearn - 0.3.17

Published by erdogant over 3 years ago

  • Fix typo in pip install instructions
    Thanks to the contribution of bencevans!
bnlearn - 0.3.16

Published by erdogant over 3 years ago

  • tabu_length is configurable in hill climb search (Thanks to contribution of ivylee!)
bnlearn - 0.3.15

Published by erdogant over 3 years ago

  • the use of black_list and white_list requires setting parameter method type
  • update unit test
  • update sphinx docs
bnlearn - 0.3.14

Published by erdogant over 3 years ago

  • Better variable naming in "sampling" function.
  • Fix for minimum requirement matplotlib
bnlearn - 0.3.13

Published by erdogant over 3 years ago

  • Some fixes to install latest packages
bnlearn - 0.3.12

Published by erdogant over 3 years ago

  • Fixes to stay compatible with latest version of pgmpy (0.1.13)
  • Added functionality to perform structure learning using method of Chow-Liu
  • Random code cleaning, pep styling
bnlearn - 0.3.11

Published by erdogant almost 4 years ago

  • Fixed output to console using the verbosity. If it is set to 0, nothing should be printed.
bnlearn - 0.3.10

Published by erdogant about 4 years ago

  • check for CPDs validity.
bnlearn - 0.3.8

Published by erdogant about 4 years ago

  • fix for plot as it did not work anymore because of update in networkx.
  • fix for printing CPDs. This was not always possible.
  • verbosity messages capitalized chars are lowered
  • Check for networkx version, should be >2.5
  • docstring updates
  • improvements in code styling
bnlearn - 0.3.7

Published by erdogant over 4 years ago

  • added to hc: white_list, black_list enforcing or filtering possibility
  • added to hc: epsilon parameter
  • added to hc: max_iter parameter