Is there a way to instantiate general variables in probability tables of discrete nodes?

The front end.
Post Reply
PCherubini
Posts: 26
Joined: Thu Mar 24, 2022 9:00 am

Is there a way to instantiate general variables in probability tables of discrete nodes?

Post by PCherubini »

I've got a network with a lot of discrete chance nodes that with the same probability distribution trable. I must try the network with different discrete values, and it would be incredibly faster if, instead of changing all the tables manually, I could instantiate some general variables, and then put the variables in the table. Namely, instead of a table such as:
level1 level2
State0 .9 .6
State1 .1 .4

a table like this:
level1 level2
State0 a b
State1 c d
with variable a, b, c, d defined elsewhere (a=.9, etc). In this way, by changing the variables definitions I could change all the nodes at the same time. Can it be done in GeNIe? Thx
marek [BayesFusion]
Site Admin
Posts: 430
Joined: Tue Dec 11, 2007 4:24 pm

Re: Is there a way to instantiate general variables in probability tables of discrete nodes?

Post by marek [BayesFusion] »

I'm afraid you cannot do this in GeNIe. The fastest way would be copying and pasting the entire table from the source to the destination nodes. This, I'm afraid, is not what you would like. It seems to me that you should program this in your favorite programming language and use SMILE. This will be very easy there. Please look at the tutorial programs in SMILE Wrappers manual -- it is really easy. There are SMILE wrappers for Java, .NET, .COM, Python. R. SMILE can be accessed directly from C/C++.

I hope this helps,

Marek
PCherubini
Posts: 26
Joined: Thu Mar 24, 2022 9:00 am

Re: Is there a way to instantiate general variables in probability tables of discrete nodes?

Post by PCherubini »

Thank you Marek! I'll try to program it in R. However, for future releases, it might worth of consideration for you to add this feature directly to GeNIe... it should be easy enough, and it might be useful for many users.
Post Reply