Calculating disjunction of conditional probabilities

The front end.
Post Reply
bsc.j.j.w
Posts: 3
Joined: Sat Sep 13, 2014 4:36 pm

Calculating disjunction of conditional probabilities

Post by bsc.j.j.w »

Dear all,

I have a small problem with calculating the following probabilities in GeNIE. Let me sketch the problem, given the car diagnostic model (see: http://www.norsys.com/netlib/car_diagnosis_2.htm), is it possible to calculate, within GeNIe, the following probability?

P(car cranks = false V car starts = true | battery = weak)

I know how to calculate the probability P(car cranks = false | .....) and P(car starts = true | ....) in GeNIe, but I couldn't figure out how to calculate the disjunction in GeNIe. If it's not possible, then it suggests that I need to rewrite the probabilities into probabilities that I know right?

Thanks for your answers!

Kind regards,

Wen Jun Jie
marek [BayesFusion]
Site Admin
Posts: 430
Joined: Tue Dec 11, 2007 4:24 pm

Re: Calculating disjunction of conditional probabilities

Post by marek [BayesFusion] »

Dear Wen Jun Jie,

You can solve this problem easily by adding a deterministic node that will be a child of both Car Cranks and Car Starts nodes. Th enode will be tru when the OR condition that you describe will be true. The marginal of that new node will be the probability that you want. Does this make sense? Conjunctions can be calculated this way as well but GeNIe/SMILE calculate them already -- just preserve the clique potentials (a switch in the Network menu) and look into the clique potentials -- the probability of conjunction should be there. I hope this helps.
Cheers,

Marek
bsc.j.j.w
Posts: 3
Joined: Sat Sep 13, 2014 4:36 pm

Re: Calculating disjunction of conditional probabilities

Post by bsc.j.j.w »

Dear Marek,

I first would like to express my gratitude for your time and consideration in answering my question. Your solution is simply brilliant and I can't imagine that I did not came up with this solution. The solution you provided is perfectly clear (the first one). However, I believe the method of adding a dummy node will not work if I did the following:

P(car cranks = true V car starts = true | battery = weak)

In calculating conjunctions, I thought I just needed to insert my evidence into the nodes and then just click on the correct node to get the probabilities. Please correct me if I am wrong. I am unfamiliar with what the option "preserve clique potentials" do. Can you shed some light for me onto this?

Thank you in advance for your help!
marek [BayesFusion]
Site Admin
Posts: 430
Joined: Tue Dec 11, 2007 4:24 pm

Re: Calculating disjunction of conditional probabilities

Post by marek [BayesFusion] »

I don't see much difference between the two problems -- you will just need to define the CPT in the dummy node differently. It may be the case, of course, that I don't understand your problem.

If you select Network/Algorithm/Preserve the Clique Potentials, you will have an additional button in the Value tab after updating the network. Clicking on this button will allow you to select the nodes within a clique that you can see joint PD of. If the nodes that you can see the joint PD for are far from each other, a trick is to add an arc between them -- they will be within the same family and there will be a clique that will have both.
I hope this helps.

Marek
bsc.j.j.w
Posts: 3
Joined: Sat Sep 13, 2014 4:36 pm

Re: Calculating disjunction of conditional probabilities

Post by bsc.j.j.w »

Dear Marek,

no you understand my problem perfectly. I understand it now. Thank you for your help!

Yours sincerely,

Wen Jun Jie
Post Reply