Bayes Nets

  • View

  • Download

Embed Size (px)


Bayes Nets. 10-701 recitation 04-02-2013. Bayes Nets. Allergy. Nose. Sinus. Flu. Headache. Represent dependencies between variables Compact representation of probability distribution. Encodes causal relationships. Conditional independence. N ose. Sinus. Sinus. Flu. Headache. Nose. - PowerPoint PPT Presentation


Bayes Nets

Bayes Nets10-701 recitation04-02-2013Bayes NetsRepresent dependencies between variablesCompact representation of probability distribution

FluAllergySinusHeadacheNoseEncodes causal relationships

Conditional independenceP(X,Y|Z) = P(X|Z) x P(Y|Z)FluSinusNoseNoseSinusHeadacheF notNFN | SN notHNH | SConditional independenceFluSinusAllergyFAF notA | SExplaining away:P(F = t | S = t) is highBut P(F = t | S = t , A = t) is lower

Joint probability distributionChain rule of probability: P(X1, X2, , Xn) = P( X1) P( X2|X1) P(Xn|X1,X2Xn-1)

Joint probability distributionFluAllergySinusHeadacheNoseChain rule of probability: P(F,A,S,H,N) = P(F) P(A|F) P(S|A,F) P(H|F,A,S)P(N|F,A,S,H)

Table with 25 entries!Joint probability distributionFluAllergySinusHeadacheNoseP(F)P(A)P(S|F,A)P(H|S)P(N|S)Local markov assumption: A variable X is independent of its non-descendants given its parents P(F,A,S,H,N) = P(F) P(A) P(S|A,F) P(H|S)P(N|S)

F = t, A = tF = t, A = fF = f, A = t F = f, A = fS = t0. = f0., InferenceFluAllergySinusHeadacheNose=tP(F)P(A)P(S|F,A)P(H|S)P(N|S)P(F = t | N = t) ?

P(F=t|N=t) = P(F=t,N=t)/P(N=t)

P(F,N=t) = A,S,H P(F,A,S,H,N=t) = A,S,H P(F) P(A) P(S|A,F) P(H|S)P(N=t|S)

Moralizing the graphFluAllergySinusNose=tEliminating A will create a factor with F and S

To assess complexity we can moralize the graph: connect parents

HeadacheChose an optimal orderFluAllergySinusNose=tIf we start with H: P(F,N=t) = A,S P(F) P(A) P(S|A,F) P(N=t |S) H P(H|S) = A,S P(F) P(A) P(S|A,F) P(N=t |S)

=1FluAllergySinusNose=tRemoving S P(F,N=t)= A,S P(F) P(A) P(S|A,F) P(N=t |S) = A P(F) P(A) s P(S|A,F) P(N=t |S) = A P(F) P(A) g1(F,A)

FluAllergyNose=tRemoving A P(F,N=t)= P(F) A P(A) g1(F,A) = P(F) g2(F)

P(F=t|N=t) = P(F=t,N=t)/P(N=t)

P(N=t) = F P(F,N=t)

=P(N=t|F)Independencies and active trails

Is AH? When is it not? A is notH when given C and F or F or F and not {B,D,E,G}Independencies and active trailsActive trail between variables X1,X2Xn-1 when: Xi-1 -> Xi -> Xi+1 and Xi not observed Xi-1