rtificial Intelligence ayes Nets print troubleshooter (part of Windows 95) Nilsson - hapter 19 Russell and Norvig - hapter 14 ayes Nets; page 1 of 21 ayes Nets; page 2 of 21 joint probability distributions E1 E2 E3 E4 E5 D1 D2 D3 0.05 0.03 P(D1 E1, NO E3) - inefficient for reasoning - hard to acquire the probabilities ayes nets = belief nets make use of independence inherent in the domain expert systems: medicine, Microsoft P() ayes net = directed acyclic graph with conditional probability tables urglary Johnalls larm P(J).90.05 E P().95.94.29 Maryalls P(E).002 this really means P(= =,E=) P(M).70.01 nodes = random variables, links = direct influences ayes Nets; page 3 of 21 ayes Nets; page 4 of 21
conditional probability tables from ayes nets to joint probability distributions Y Y P( ND, Y) urglary P() P(E).002 ND 1.0 0.0 0.0 0.0 larm E P().95.94.29 OIN P(OIN) 0.5 Johnalls P(J).90.05 Maryalls P(M).70.01 urglary larm Johnalls Maryalls 0.000001197 P(, E,, J, M) = P() P(E) P(,E) P( J ) P(M ) ayes Nets; page 5 of 21 ayes Nets; page 6 of 21 ayes Nets; page 7 of 21 from joint probability distributions to ayes nets (1) repeatedly: - pick a variable - condition it on the smallest possible set of variables picked previously P(,, ) = P() P( ) P(,) 0.054 0.126 0.002 0.018 0.432 0.288 0.032 0.048 order:,, P() 0.2 P() 0.3 0.1 0.6 0.4 P() 0.9 0.9 ayes Nets; page 8 of 21 from joint probability distributions to ayes nets (2) 1 2 urglary 3 larm Johnalls Maryalls ordering does matter 4 5 urglary 3 larm 4 5 2 1 Johnalls Maryalls urglary Johnalls sizes of the conditional probability tables 10 13 put causes before effects - smaller network - easier to make probability judgements 2 4 5 3 31 larm 1 Maryalls
from joint probability distributions to ayes nets (3) independence example warning attery ayes nets merely represent joint probability distributions ayes nets have nothing to do with causality Radio Ignition Gas it is smart, but not necessary, to make the edges go from causes to effects Starts all six of these ayes nets are fine! Moves gas and radio - independent given ignition - independent given battery - independent given nothing - dependent given starts - dependent given moves ayes Nets; page 9 of 21 ayes Nets; page 10 of 21 direction-dependent separation if every undirected path from a node in to a node in Y is blocked by E, then and Y are conditionally independent given E three ways in which a path from to Y can be blocked by evidence E example (1) re Radio and Gas are guaranteed to be independent (not knowing anything)? (1) Z E Y Radio attery Ignition Gas Starts (2) (3) Z Z Yes, the structure guarantees it. here is only one undirected path from Radio to Gas. his path is blocked because Ignition -> Starts <- Gas is blocked. Moves ayes Nets; page 11 of 21 ayes Nets; page 12 of 21
example (2) wo astonomers, in different parts of the world, make measurements M1 and M2 of the number of stars N in some small region of the sky, using their telescopes. Normally, there is a small possibility of error by up to one star. Each telescope can also (with a slightly smaller probability) be badly out of focus (event 1 and 2), in which case the scientist will undercount by three or more stars. Does the following network correctly reflect these facts? example (2) wo astonomers, in different parts of the world, make measurements M1 and M2 of the number of stars N in some small region of the sky, using their telescopes. Normally, there is a small possibility of error by up to one star. Each telescope can also (with a slightly smaller probability) be badly out of focus (event 1 and 2), in which case the scientist will undercount by three or more stars. Does the following network correctly reflect these facts? 1 2 1 N 2 M1 M2 M1 M2 N ayes Nets; page 13 of 21 ayes Nets; page 14 of 21 example (3) some simple inferences ayes Nets; page 15 of 21 re urglary and Johnalls are guaranteed to be conditionally independent given larm? urglary urglary larm larm Johnalls Maryalls Johnalls Maryalls some of the unblocked undirected paths Yes, the structure guarantees it. No, the structure does not guarantee it. D P() P() P() P(D) 0.8 0.4 0.8 0.8 0.3 0.3 0.3 P( ) = 0.8 these do NO need P(NO ) = 1 - P( ) = 0.2 to sum to one P( NO ) = 0.3 P(NO NO ) = 1 - P( NO ) = 0.7 P() = P() P( ) + P(NO ) P( NO ) = 0.4 0.8 + 0.6 0.3 = 0.5 P( ) = P( ) P() / P() = 0.8 0.4 / 0.5 = 0.64 P(, ) = P() P( ) P( ) + P(NO ) P( NO ) P( NO ) = 0.4 0.8 0.8 + 0.6 0.3 0.3 = 0.31 P(D ) = P(D ) P( ) + P(D NO ) P(NO ) = 0.8 0.8 + 0.3 0.2 = 0.7 ayes Nets; page 16 of 21
more complex inferences complexity attery probabilistic inference on polytrees can be done in polynomial time Radio Ignition Gas polytrees are DGs where there is at most one path between any two nodes Starts Moves observe evidence; for example, symptoms calculate the probability of the various diseases given the evidence in general, probabilistic inference is NP hard 1a) 1b) + D D D clustering conditioning 2) stochastic simulation ayes Nets; page 17 of 21 ayes Nets; page 18 of 21 E 1 U 1 here: algorithms for causal chains E 1 U 1 here: algorithms for causal chains U 2 P( E 1, E 2 ) U 2 P( E 1 ) U 3 U 3 Y 3 Y 2 Y 1 P( E 2, E 1 ) = P(E 2, E 1 ) P( E 1 ) / P(E 2 E 1 ) P( E 2, E 1 ) is proportional to P(E 2 ) P( E 1 ) Y 3 Y 2 Y 1 for each node U i from U 1 to : P(U i E 1 ) = P(U i-1, U i E 1 ) + P(NO U i-1, U i E 1 ) = P(U i-1 E 1 ) P(U i U i-1, E 1 ) + P(NO U i-1 E 1 ) P(U i NO U i-1, E 1 ) = P(U i-1 E 1 ) P(U i U i-1 ) + (1 - P(U i-1 E 1 )) P(U i NO U i-1 ) E 2 E 2 ayes Nets; page 19 of 21 ayes Nets; page 20 of 21
E 1 U 1 U 2 here: algorithms for causal chains P(E 2 ) U 3 Y 3 Y 2 Y 1 for each node Y i from to Y 1 : P(E 2 Y i ) = P(Y i-1, E 2 Y i ) + P(NO Y i-1, E 2 Y i ) = P(Y i-1 Y i ) P(E 2 Y i, Y i-1 ) + P(NO Y i-1 Y i ) P(E 2 Y i, NO Y i-1 ) = P(Y i-1 Y i ) P(E 2 Y i-1 ) + (1 - P(Y i-1 Y i )) P(E 2 NO Y i-1 ) E 2 ayes Nets; page 21 of 21