Question about connection between Chance node and Equation node

The front end.
Post Reply
kumonaka
Posts: 3
Joined: Wed Feb 19, 2025 11:40 am

Question about connection between Chance node and Equation node

Post by kumonaka »

Hi everyone.

Thank you for the support offered in this forums which are tremendously helpful for all of us.

I've just established a hybrid bayesian network(Fig.1). The Node2(Earthquake input) is based on Lognormal distribution. By comparing the value between Node2 and provided value of custom function "lognormalcdf"(Fig.2), the probabilistic distribution of DSi could be determined (shown as Node5 in Fig.1). However, to convert the comparing consequence to Chance node, specified value of DSi were defined as Fig.2 and Fig.3.

For example, if output of one operation is DS1, the program would operate as below:
①(Node3 damage state)comparing the value of Node2(Earthquake input) and custom function "lognormalcdf"(Fig.2)
②(Node3 damage state)assigning the value of Node3 as 0.33(Fig.2)
③(Node3 damage state)discretization. DS1: 0.2<0.33<0.34(Fig.3)
④(Node5)connection. Defining a diagonal matrix in Node5.

I'm wondering if there have any method to connect the Node5 and Node2(Earthquake input) in this example. By operating step ① and step ④ to connect Chance node and Equation node.

Thank you in advance for your help
Attachments
1.png
1.png (54.94 KiB) Viewed 27155 times
2.png
2.png (238.64 KiB) Viewed 27155 times
3.png
3.png (49.84 KiB) Viewed 27155 times
marek [BayesFusion]
Site Admin
Posts: 441
Joined: Tue Dec 11, 2007 4:24 pm

Re: Question about connection between Chance node and Equation node

Post by marek [BayesFusion] »

I will be happy to try to help. I have a hard time understanding the definition of the node "damage state". You are making several calls to the Uniform() function and this confuses me somewhat. Please note that as Uniform() generates a random number from the Uniform distribution, each time you call it, you get a different value. Furthermore, what is the definition of the lognormalcdf() function. I understand that it is a custom function and it would be nice to see what exactly it does. Here you are using just one (the same) sample of Node2 ("Earthquake input"), which makes more sense to me without knowing what precisely you want to accomplish. If you want to get just one and the same sample from Uniform(), please create a separate node, like you did in case of "Earthquake input".

Finally, your question whether it is possible to connect Node2 and Node5 has an affirmative answer. It is sufficient to specify the discretization of Node2 like you did for "damage state" and then define the CPT for Node5 conditional on two discrete parents.
I hope this helps,

Marek
kumonaka
Posts: 3
Joined: Wed Feb 19, 2025 11:40 am

Re: Question about connection between Chance node and Equation node

Post by kumonaka »

marek [BayesFusion] wrote: Wed Mar 05, 2025 1:24 pm I will be happy to try to help. I have a hard time understanding the definition of the node "damage state". You are making several calls to the Uniform() function and this confuses me somewhat. Please note that as Uniform() generates a random number from the Uniform distribution, each time you call it, you get a different value. Furthermore, what is the definition of the lognormalcdf() function. I understand that it is a custom function and it would be nice to see what exactly it does. Here you are using just one (the same) sample of Node2 ("Earthquake input"), which makes more sense to me without knowing what precisely you want to accomplish. If you want to get just one and the same sample from Uniform(), please create a separate node, like you did in case of "Earthquake input".

Finally, your question whether it is possible to connect Node2 and Node5 has an affirmative answer. It is sufficient to specify the discretization of Node2 like you did for "damage state" and then define the CPT for Node5 conditional on two discrete parents.
I hope this helps,

Marek
Hi, Marek
I'm glad to receive your reply. you're right, I made a mistake in Node "damage state", generated different value in comparing. Besides, the lognormalcdf() function is defined as follows:
lognormalcdf(x,mu,sigma)=NormalCDF(Ln(x),mu,sigma)
To understand the use of Node "damage state", I have attached Fig.1. The curves in the figure are Lognormal cumulative distribution curves and the horizontal coordinates can be considered as "Earthquake input". In one sample, the value of the "Earthquake input" has been determined (for example, value 5 in Fig.1). By generating a random number and comparing it to the curve value, the damage state of components could be determined (for example, generated random value 0.3 is smaller than the value of the curve DS3, so the damage state of this component is DS3). This process is similar to the Monte Carlo method, where a probability distribution is determined by large random samples.
Thanks again for correcting the error and for your critical review of the model!
Attachments
1.png
1.png (182.2 KiB) Viewed 25564 times
marek [BayesFusion]
Site Admin
Posts: 441
Joined: Tue Dec 11, 2007 4:24 pm

Re: Question about connection between Chance node and Equation node

Post by marek [BayesFusion] »

Thank you for the additional description. The lognormalCDF() does make sense (I assume that this is what your theory dictates). I still think that if you want to make the two nodes parents of Node5, you should make sure that the discretization of both makes sense and then specify the CPT of Node5 conditional on the two nodes. If you decide to make Node5 a continuous node, you could of course try to find an equation that expresses Node5 as a function of the other two nodes. Does this help?

Marek
kumonaka
Posts: 3
Joined: Wed Feb 19, 2025 11:40 am

Re: Question about connection between Chance node and Equation node

Post by kumonaka »

marek [BayesFusion] wrote: Thu Mar 06, 2025 5:23 pm Thank you for the additional description. The lognormalCDF() does make sense (I assume that this is what your theory dictates). I still think that if you want to make the two nodes parents of Node5, you should make sure that the discretization of both makes sense and then specify the CPT of Node5 conditional on the two nodes. If you decide to make Node5 a continuous node, you could of course try to find an equation that expresses Node5 as a function of the other two nodes. Does this help?

Marek
Thank you so much for the clear guidance, Marek! I'll proceed to specify Node5's CPT as suggested. Your insights have been invaluable in structuring this probabilistic model.
Post Reply