Ratio_arc in RandomBN() #18
Replies: 4 comments 2 replies
-
Hello, we use the approach from [Ide & Cozman, 2002]. However, iterating in a MCMC is not done correctly : in our implementation, when the action of adding an arc is called, it may not take place if the constraints are not respected (acyclicity, etc.). It's not right to do this, as it's possible that you won't be able to iterate enough to obtain the required number of arcs. In your case, you want a graph with 8 nodes and 24 arcs, which isn't very far from the complete graph (26 arcs). It becomes difficult to randomly find syntactically correct arcs... I guess that's the reason. In the context of a "classic" Bayesian network (ratio>1,<2 I'd say), the algorithm should work fine. |
Beta Was this translation helpful? Give feedback.
-
Glad to hear you will fix this asap...
…On Thu, Aug 17, 2023, 5:56 AM Pierre-Henri Wuillemin < ***@***.***> wrote:
but we need to improve this code asap :-(
—
Reply to this email directly, view it on GitHub
<#18 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF3Z3CR23PYMTFDHNOF7MEDXVXTGNANCNFSM6AAAAAA3ONAWYY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
@phwuil One more question, how come I cannot set |
Beta Was this translation helpful? Give feedback.
-
We want to generate connected graphs. The minimal connected graph is a tree. A tree of n nodes has n-1 arcs. So the ratio 0.5 is not possible (except if n=2 which is not authorized neither)... |
Beta Was this translation helpful? Give feedback.
-
I give a ratio_arc = 3 and set the number of nodes to be 8, how come the resulting graph has only 9 arcs in total? It seems like it is inconsistent with what the documentation describes that
ratio_arc (float) – number of arcs = n * ratio_arc
.Beta Was this translation helpful? Give feedback.
All reactions