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 4 forks source link

add routine demo for paper example #56

Closed dynaryu closed 8 months ago

dynaryu commented 8 months ago
jieunbyun commented 8 months ago

Thank you, by the way, the jupyter notebook (gbnb_paper_ex.ipynb) has disappeared. Do you know why..? I wanted to check the version revised by you, but I cannot find the file anymore.

dynaryu commented 8 months ago

I removed the file from the tracking list, but you should have the file at your local directory. Otherwise I restored it. All codes except the last part were copied across to the test file.

jieunbyun commented 8 months ago

Thank you! Yes you are right. The "get_prob" file is exactly the same as "cpm.get_prob".

By the way, "cpm.get_prob" does not seem to be working when variables are given more than one. Could you take a look?

For example, a command "cpm.get_prob( Mnew, [varis['sys'], varis['e1']], [1, 0] )" rasies an error reading "AssertionError: C must be a single row". "test_get_prob" function only has tests with one variable.