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

review graphical models
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 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

  • f the conditional distribution P(RVs | data)

(the posterior)

  • called inference

1

slide-2
SLIDE 2

Review: Bayes nets

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

2

slide-3
SLIDE 3

Review: CPTs

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

3

slide-4
SLIDE 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

slide-5
SLIDE 5

Review: factors

  • sum constraints:
  • often results from:
  • note: many ways to display same table!

5

slide-6
SLIDE 6

Review: parameter learning

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

6

slide-7
SLIDE 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

slide-8
SLIDE 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

slide-9
SLIDE 9

Inference

  • Typical Q: given Ra=F,

Ru=T, what is P(W)?

9

slide-10
SLIDE 10

Incorporate evidence

Condition on Ra=F, Ru=T

10

slide-11
SLIDE 11

Eliminate nuisance nodes

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

11

slide-12
SLIDE 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

slide-13
SLIDE 13

One last elimination

13

slide-14
SLIDE 14

Checking our work

  • http://www.aispace.org/bayes/version5.1.6/bayes.jnlp

14

slide-15
SLIDE 15

Discussion

  • FLOP count
  • Steps: instantiate evidence, eliminate

nuisance nodes, normalize, answer query

  • each elimination introduces:
  • Normalization
  • Each elimination order:
  • some tables:

15

slide-16
SLIDE 16

Example: elim order

16

slide-17
SLIDE 17

Example: elim order

  • Compare: B,C,D vs. C,D, B

17

slide-18
SLIDE 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

slide-19
SLIDE 19

Finer & finer discretization

0.2 0.4 0.6 0.8 1 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4

19

slide-20
SLIDE 20

Finer & finer discretization

0.2 0.4 0.6 0.8 1 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.2 0.4 0.6 0.8 1 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4

19

slide-21
SLIDE 21

Finer & finer discretization

0.2 0.4 0.6 0.8 1 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.2 0.4 0.6 0.8 1 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.2 0.4 0.6 0.8 1 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4

19

slide-22
SLIDE 22

In the limit: density

  • lim P(x X x+h) / h = P(x)

0.2 0.4 0.6 0.8 1 0.5 1 1.5 2 2.5 3 3.5 4

20

slide-23
SLIDE 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

slide-24
SLIDE 24

Events

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

22

slide-25
SLIDE 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

slide-26
SLIDE 26

Continuous GM example

0.5 1 0.5 1 0.5 1 1.5

24