bayesian-networksmodel-fitting

Bayesian network using BNLEARN package in python


can we create a Bayesian network using bnlearn package in python for 7 continuous variables (if the variables are categorical I can create a BN model)? If so, can you please guide me to any reference or example.


Solution

  • At the moment bnlearn can only be used for discrete/categorical modeling. There are possibilities to model your data though. You can for example discretize your variables with domain/experts knowledge or maybe a more data-driven threshold. Lets say, if you have a temperature, you can mark temperature < 0 as freezing, and >0 as normal. Or many smaller categories.