You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I find your library an excellent tool for Bayesian network research.
I'm currently trying to work with hybrid Bayesian networks (Discrete and Gaussian CPDs). In your library I have identified this as the CLGNetworkType.
Request
The issue is that I can't find in the documentation how to access the parameters (probabilities) in the Conditional Probability Table (CPT) of a DiscreteFactor.
I have seen it is possible with continuous factors (e.g., beta, variance).
But I would like to know if it's possible with the discrete ones.
Thank you very much.
The text was updated successfully, but these errors were encountered:
for now, the easiest way to access the CPT is through the DiscreteFactor.logl() function.
I could provide alternative ways to access that info but I am not sure what is the best format to return it (probably, a multidimensional array?). Feel free to make any suggestions.
Thank you very much for the quick workaround. It is very helpful.
Regarding the best CPT output format, I know it's not trivial. However I can give you some ideas:
One of the problems I find is knowing the possible variable values.
For instance, suppose we have a random variable A = {a1, a2}. I think that having a function returning a list with its possible values e.g., returning [a1, a2].
On the other hand, we have the problem of outputting the CPT probabilities in an intuitive way.
I think that the best way is with a Pandas Multiindex Dataframe (https://pandas.pydata.org/pandas-docs/stable/user_guide/advanced.html).
To help you understand my idea, I have attached a Jupyter Notebook with a simple example:
Brief Context
Hello, I find your library an excellent tool for Bayesian network research.
I'm currently trying to work with hybrid Bayesian networks (Discrete and Gaussian CPDs). In your library I have identified this as the CLGNetworkType.
Request
The issue is that I can't find in the documentation how to access the parameters (probabilities) in the Conditional Probability Table (CPT) of a DiscreteFactor.
I have seen it is possible with continuous factors (e.g., beta, variance).
But I would like to know if it's possible with the discrete ones.
Thank you very much.
The text was updated successfully, but these errors were encountered: