Skip to content

Commit

Permalink
update exmaple
Browse files Browse the repository at this point in the history
  • Loading branch information
erdogant committed Dec 18, 2021
1 parent 76ff966 commit 47f4de6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions bnlearn/examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,13 @@

df = bn.import_example('asia')
edges = [('smoke', 'lung'),
('smoke', 'bronc'),
('lung', 'xray'),
('bronc', 'xray')]
('smoke', 'bronc'),
('lung', 'xray'),
('bronc', 'xray')]


# Make the actual Bayesian DAG
DAG = bn.make_DAG(edges, verbose=0)
DAG = bn.make_DAG(edges, verbose=0, methodtype='bayes')
model = bn.parameter_learning.fit(DAG, df, verbose=3)
# Generate some data based on DAG
df = bn.sampling(model, n=1000)
Expand Down

0 comments on commit 47f4de6

Please sign in to comment.