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 » Tue Apr 15, 2014 8:17 am

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: 1247
Joined: Mon Nov 26, 2007 5:51 pm

Re: How to combine two BBNs

Post by shooltz[BayesFusion] » Tue Apr 15, 2014 10:19 am

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 » Wed Apr 16, 2014 6:59 am

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