review graphical models
play

Review: graphical models Represent a distribution over some RVs - PowerPoint PPT Presentation

Review: graphical models Represent a distribution over some RVs using both diagrams and numbers Chief problem: given a GM (the prior ) and some evidence ( data ), compute properties of the conditional distribution P(RVs | data) (the


  1. Review: graphical models • Represent a distribution over some RVs • using both diagrams and numbers • Chief problem: given a GM (the prior ) and some evidence ( data ), compute properties of the conditional distribution P(RVs | data) (the posterior ) • called inference 1

  2. Review: Bayes nets • Bayes net = DAG + CPT • Independence • from DAG alone v. accidental • d-separation • blocking, explaining away • Markov blanket 2

  3. Review: CPTs • P(W | Ra, O) = • Represents probability distribution(s) • for: • sums to 1: 3

  4. Review: factor graphs • Undirected, bipartite graph • factor & variable nodes • Both Bayes nets and factor graphs can represent any distribution • either may be more efficient • conversion is easier bnet � factor graph • accidental v. graphical indep’s may differ 4

  5. Review: factors • sum constraints: • often results from: • note: many ways to display same table! 5

  6. Review: parameter learning • Bayes net, when fully observed • counting, Laplace smoothing • Missing data: harder • Factor graph: harder (even if fully observed) 6

  7. Admin • HWs are due at 10:30 • don’t skip class to work on it and turn it in at noon • Late HWs are due at 10:30 (+ n days) • must use a whole number of late days • HWs should be complete at 10:30 7

  8. Inference • Inference: prior + evidence � posterior • We gave examples of inference in a Bayes net, but not a general algorithm • Reason: general algorithm uses factor-graph representation • Steps: instantiate evidence, eliminate nuisance nodes, normalize, answer query 8

  9. Inference • Typical Q: given Ra=F, Ru=T, what is P(W)? 9

  10. Incorporate evidence Condition on Ra=F, Ru=T 10

  11. Eliminate nuisance nodes • Remaining nodes: M, O, W • Query: P(W) • So, O&M are nuisance—marginalize away • Marginal = 11

  12. Elimination order • Sum out the nuisance variables in turn • Can do it in any order, but some orders may be easier than others • Let’s do O, then M 12

  13. One last elimination 13

  14. Checking our work • http://www.aispace.org/bayes/version5.1.6/bayes.jnlp 14

  15. Discussion • FLOP count • Steps: instantiate evidence, eliminate nuisance nodes, normalize, answer query • each elimination introduces: • Normalization • Each elimination order: • some tables: 15

  16. Example: elim order 16

  17. Example: elim order • Compare: B,C,D vs. C,D, B 17

  18. Continuous RVs • All RVs we’ve used so far have been discrete • Occasionally, we used a continuous one by discretization • We’ll want to use truly continuous ones below 18

  19. Finer & finer discretization 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 0 0.2 0.4 0.6 0.8 1 19

  20. Finer & finer discretization 0.4 0.4 0.35 0.35 0.3 0.3 0.25 0.25 0.2 0.2 0.15 0.15 0.1 0.1 0.05 0.05 0 0 0 0 0.2 0.2 0.4 0.4 0.6 0.6 0.8 0.8 1 1 19

  21. Finer & finer discretization 0.4 0.4 0.4 0.35 0.35 0.35 0.3 0.3 0.3 0.25 0.25 0.25 0.2 0.2 0.2 0.15 0.15 0.15 0.1 0.1 0.1 0.05 0.05 0.05 0 0 0 0 0 0 0.2 0.2 0.2 0.4 0.4 0.4 0.6 0.6 0.6 0.8 0.8 0.8 1 1 1 19

  22. In the limit: density 4 3.5 3 2.5 2 1.5 1 0.5 0 0 0.2 0.4 0.6 0.8 1 • lim P(x � X � x+h) / h = P(x) 20

  23. Properties of densities • instead of sum to 1, • density may be • PDF = • Confusingly, we use P( � ) for both, and sometimes people say distribution to mean either discrete or continuous 21

  24. Events • For continuous RVs X, Y: • Sample space � = { } • Event = subset of � • Density: events � � + • disjoint union: additive • P( � ) = 1 22

  25. Continuous RVs in graphical models • Very useful to have continuous RVs in GMs • CPTs or potentials are now functions (tables where some dimensions are infinite) • E.g.: (X, Y) � [0, 1] 2 • � (X, Y) = • P(X, Y) = 23

  26. Continuous GM example 1.5 1 1 0.5 0 0.5 1 0.5 0 0 24

Recommend


More recommend