jieunbyun / BNS-JT

Reference: Byun, J.-E. and Song, J. (2021). A general framework of Bayesian network for system reliability analysis using junction tree. Reliability Engineering & System Safety, 216, 107952.
MIT License
5 stars 3 forks source link

add str option in get_prob #54

Closed dynaryu closed 6 months ago

dynaryu commented 6 months ago

Can you explain meaning of pf_sys in test_inference2 of test_gen_bnb.py? It seems the result of get_prob is not much different from p values for binary system states.

jieunbyun commented 6 months ago

Do you mean why Msys_obs.p does not sum to 1? It is because of the conditioning.

dynaryu commented 6 months ago

I understand that the sum would not be 0 but wonder what p means corresponding to 0 and 1 compared to the test_inference1 where no observation was used. If 0 and 1 correspond to P(sys=0|obs) and P(sys=1|obs) respectively, then what Pf_sys means?

jieunbyun commented 6 months ago

It represents P(sys=0,obs) and P(sys=1,obs). And so, P(sys=0,obs) + P(sys=1,obs) = P(obj) (i.e. the probability that the observation is made); and P(sys=0 | obs ) = P(sys=0 | obs ) / ( P(sys=0 | obs ) + P(sys=1 | obs ) ).