Bn Learner? #28
-
Hi, if I have some discrete dataset, I want to impose a DAG structure on this dataset and and refill the potential based on the observed data and be able to derive the joint distribution according to factorization so that I can do a posterior update with some prior...I remember bnlearner is something relevant, but I am not sure. Would you please provide some pointers? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 11 replies
-
Hi @kenneth-lee-ch , sorry or the delay :-) When you know the structure and just want to "learn" the parameters from a database, the functions is https://pyagrum.readthedocs.io/en/1.17.2/BNLearning.html#pyAgrum.BNLearner.learnParameters |
Beta Was this translation helpful? Give feedback.
-
If I just want to count the frequency to fill the CPT, is learnParameters() the right option? |
Beta Was this translation helpful? Give feedback.
Hi @kenneth-lee-ch , sorry or the delay :-)
When you know the structure and just want to "learn" the parameters from a database, the functions is
learnParameters
, you can choose a priori (for instance, a smoothing).https://pyagrum.readthedocs.io/en/1.17.2/BNLearning.html#pyAgrum.BNLearner.learnParameters
https://pyagrum.readthedocs.io/en/1.17.2/notebooks/12-Examples_KaggleTitanic.html#Making-a-BN-without-learning-data-(structureFromExpert4)