How to combine two BBNs

The engine.
Post Reply
musicpxg
Posts: 19
Joined: Sat Feb 16, 2013 6:24 am

How to combine two BBNs

Post by musicpxg »

Hi,

Given two instantiated objects of smile.Networks, i.e. net_a and net_b, can we make an arc from one node in net_a to net_b, and then update the network?

If not, is there any alternative method to achieve the same goal? I just want to update beliefs on the basis of two BBNs. It is not allowed to combine them together to one XDSL file since I am doing research in a distributed intelligent system.

Thank you!
Yang
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: How to combine two BBNs

Post by shooltz[BayesFusion] »

musicpxg wrote:Given two instantiated objects of smile.Networks, i.e. net_a and net_b, can we make an arc from one node in net_a to net_b, and then update the network?
No, the arcs can only exist between nodes in the same network.
If not, is there any alternative method to achieve the same goal?
You will need to programmatically copy the nodes, arcs and node definitions from net_b to net_a, then add the arc (using methods in smile.Network class). Alternatively, you can use some XML API to join two .xdsl files into one temporary file (assuming no node id conflicts in net_a and net_b). After loading the join file you would add the arc.
musicpxg
Posts: 19
Joined: Sat Feb 16, 2013 6:24 am

Re: How to combine two BBNs

Post by musicpxg »

shooltz wrote:Alternatively, you can use some XML API to join two .xdsl files into one temporary file (assuming no node id conflicts in net_a and net_b). After loading the join file you would add the arc.
Yes, this is a very smart idea!

Thanks a lot to shooltz! You always response fast and professionally.

Yang
Post Reply