Python library for learning the graphical structure of Bayesian networks, parameter learning, inference and sampling methods.
OTHER License
Published by erdogant 7 months ago
Published by erdogant 7 months ago
Published by erdogant 8 months ago
Published by erdogant 12 months ago
Published by erdogant 12 months ago
Published by erdogant over 1 year ago
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
Published by erdogant over 1 year ago
I am really happy to announce the following new great functionalities in bnlearn!
D3Blocks
which provides more flexibility.bnlearn
and are now imported from datazets
library.Especially for the plot
functionality, some of the input parameters are changed.
See the docs for continuous data modeling
Published by erdogant over 1 year ago
Published by erdogant over 1 year ago
Published by erdogant over 1 year ago
Published by erdogant over 1 year ago
Published by erdogant almost 2 years ago
Published by erdogant almost 2 years ago
Published by erdogant almost 2 years ago
sklearn
is changed to scikit-learn
in the setup and requirements (issue #66 )Published by erdogant almost 2 years ago
bn.plot(model)
return figure axis.python-louvain
instead of community
Example:
model = bn.import_DAG('sprinkler', CPD=True)
df = bn.sampling(model, n=1000, methodtype='bayes')
fig = bn.plot(model)
fig['ax']
Published by erdogant about 2 years ago
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}
Published by erdogant about 2 years ago
check_model
now uses Decimals to prevent Floating Point Errors in the checks: Issue #60.Published by erdogant about 2 years ago