Closed erdogant closed 3 years ago
If you have a DAG and also the CPDs, you can generate data with the sampling function. See example over here: https://erdogant.github.io/bnlearn/pages/html/Sampling%20and%20datasets.html
You can then slice the data how you need it. In your case the samples from the NO class.
Hi Erdogant, I have some questions.
DAG = bnlearn.structure_learning.fit(n_train_df)
->DAG = bnlearn.structure_learning.fit(n_train_df, class='result')
Originally posted by @timhuang1125 in https://github.com/erdogant/bnlearn/issues/18#issuecomment-787995563