Bnlearn

Latest version: v0.10.2

Safety actively analyzes 682244 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 14

0.7.8

* 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']

0.7.7

* `check_model` now uses Decimals to prevent Floating Point Errors in the checks: Issue 60.

0.7.6

* CPDs are now returned from print_CPD for further usage.

0.7.5

* Fix for issues 37 where query2df is fixed to output a structured dataframe with the query information.
* Added unit test for this issue.

0.7.4

* Added Gibbs sampling. See the [docs for examples](https://erdogant.github.io/bnlearn/pages/html/Sampling.html#gibbs-sampling).
* Improvements in verbosity messages.
* Some code refactoring/cleaning.

0.7.3

* added input parameter n_jobs where possible

Page 5 of 14

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.