Re Reas ason onin ing g Un Unde der Un Uncerta tain inty - - PowerPoint PPT Presentation

re reas ason onin ing g un unde der un uncerta tain inty
SMART_READER_LITE
LIVE PREVIEW

Re Reas ason onin ing g Un Unde der Un Uncerta tain inty - - PowerPoint PPT Presentation

Re Reas ason onin ing g Un Unde der Un Uncerta tain inty ty: B Belie lief f Netw Ne twor orks ks Com omputer Science c cpsc sc322, Lecture 2 27 (Te Text xtboo ook k Chpt 6.3) June, 1 15, 2 2017 CPSC 322, Lecture 27


slide-1
SLIDE 1

CPSC 322, Lecture 27 Slide 1

Re Reas ason

  • nin

ing g Un Unde der Un Uncerta tain inty ty: B Belie lief f Ne Netw twor

  • rks

ks

Com

  • mputer Science c

cpsc sc322, Lecture 2 27 (Te Text xtboo

  • ok

k Chpt 6.3)

June, 1 15, 2 2017

slide-2
SLIDE 2

CPSC 322, Lecture 27 Slide 2

Bi Big g Pi Pict ctur ure: e: R&R &R sy syst stem ems

Environ

  • nment

Prob

  • blem

Query Planning Deterministic Stochastic Search Arc Consistency Search Search Value Iteration

  • Var. Elimination

Constraint Satisfaction Logics STRIPS Belief Nets Vars + Constraints Decision Nets Markov Processes

  • Var. Elimination

Static Sequential Representation Reasoning Technique SLS

slide-3
SLIDE 3

CPSC 322, Lecture 27 Slide 3

Ke Key y poi

  • ints

ts Recap ap

  • We model the environment as a set of ….
  • Why the joint is not an adequate representation ?

“Representation, reasoning and learning” are “exponential” in …..

Solu lutio ion: Exploit marginal&con

  • ndition
  • nal independence

But how does independence allow us to simplify the joint?

slide-4
SLIDE 4

CPSC 322, Lecture 27 Slide 4

Lectu ture re Ov Overv rvie iew

  • Be

Beli lief f Ne Netw twor

  • rks
  • Buil

ild d sam ampl ple BN

  • Intro Inference, Compactness, Semantics
  • More Examples
slide-5
SLIDE 5

CPSC 322, Lecture 27 Slide 5

Be Beli lief f Ne Nets ts: Bu Burg rgla lary ry Exa xamp mple le

There might be a burglar ar in my house The an anti ti-burglar ar al alar arm in my house may go off I have an agreement with two of my neighbors, John and Mar ary, that they cal all me if they hear the alarm go off when I am at work Minor ear arth thquak akes may occur and sometimes the set off the alarm. Var ariab ables: Joint has entries/probs

slide-6
SLIDE 6

CPSC 322, Lecture 27 Slide 6

Be Beli lief f Ne Nets ts: Si Simp mpli lify fy th the joi

  • int
  • Typically order vars to reflect causal knowledge (i.e.,

causes before effects)

  • A burglar (B) can set the alarm (A) off
  • An earthquake (E) can set the alarm (A) off
  • The alarm can cause Mary to call (M)
  • The alarm can cause John to call (J)
  • Apply Chain Rule
  • Simplify according to marginal&conditional

independence

slide-7
SLIDE 7

CPSC 322, Lecture 27 Slide 7

Be Beli lief f Ne Nets ts: Str Structu ture re + Pro robs

  • Express remaining dependencies as a network
  • Each var is a node
  • For each var, the conditioning vars are its parents
  • Associate to each node corresponding conditional

probabilities

  • Directed Acyclic Graph (DAG)
slide-8
SLIDE 8

CPSC 322, Lecture 27 Slide 8

Burg rgla lary ry: com

  • mple

lete te BN

B E P(A=T | B,E) P(A=F | B,E) T T .95 .05 T F .94 .06 F T .29 .71 F F .001 .999 P(B=T) P(B=F ) .001 .999 P(E=T) P(E=F ) .002 .998 A P(J=T | A) P(J=F | A) T .90 .10 F .05 .95 A P(M=T | A) P(M=F | A) T .70 .30 F .01 .99

slide-9
SLIDE 9

CPSC 322, Lecture 27 Slide 9

Lectu ture re Ov Overv rvie iew

  • Be

Beli lief f Ne Netw twor

  • rks
  • Buil

ild d sam ampl ple BN

  • Intro Infe

ference, e, Co Compa pactness, Se , Seman antic ics

  • More Examples
slide-10
SLIDE 10

CPSC 322, Lecture 27 Slide 10

Bu Burg rgla lary ry E Exa xamp mple le: Bn Bnets ts in infe fere rence

(Ex1) I'm at work,

  • neighbor John calls to say my alarm is ringing,
  • neighbor Mary doesn't call.
  • No news of any earthquakes.
  • Is there a burglar?

(Ex2) I'm at work,

  • Receive message that neighbor John called ,
  • News of minor earthquakes.
  • Is there a burglar?

Our BN BN can answ swer any prob

  • babilist

stic query that can b be answ swered by proc

  • cess

ssing g the j joi

  • int!

Set digital places to monitor to 5

slide-11
SLIDE 11

CPSC 322, Lecture 27 Slide 1 1

Bu Burg rgla lary ry E Exa xamp mple le: Bn Bnets ts in infe fere rence

(Ex1) I'm at work,

  • neighbor John calls to say my alarm is ringing,
  • neighbor Mary doesn't call.
  • No n

news of an any e y ear arth thquak akes.

  • Is there a burglar?

Our BN BN can answ swer any prob

  • babilist

stic query that can b be answ swered by proc

  • cess

ssing g the j joi

  • int!

The probability of Burglar will:

  • A. Go down
  • B. Remain the same
  • C. Go up
slide-12
SLIDE 12

CPSC 322, Lecture 27 Slide 12

Ba Baye yesi sian an Ne Netw twor

  • rks

ks – Infe fere rence Typ ypes

Dia iagnostic ic

Burglary Alarm JohnCalls P(J) = 1.0 P(B) = 0.001 0.016 Burglary Earthquake Alarm

Intercau ausal al

P(A) = 1.0 P(B) = 0.001 0.003 P(E) = 1.0 JohnCalls

Predi dictiv ive

Burglary Alarm P(J) = 0.01 1 0.66 P(B) = 1.0

Mix ixed

Earthquake Alarm JohnCalls P(M) = 1.0 P(E) = 1.0 P(A) = 0.003 0.033

slide-13
SLIDE 13

CPSC 322, Lecture 27 Slide 13

BN BNnets ts: Co Comp mpac actn tness ss

B

E

P(A=T | B,E) P(A=F | B,E) T

T

.95 .05 T

F

.94 .06 F

T

.29 .71 F

F

.001 .999 P(B=T) P(B=F ) .001 .999 P(E=T)

P(E=F )

.002

.998

A P(J=T | A) P(J=F | A) T .90 .10 F .05 .95 A P(M=T | A) P(M=F | A) T .70 .30 F .01 .99

slide-14
SLIDE 14

CPSC 322, Lecture 27 Slide 14

BN BNet ets: s: Co Comp mpac actn tnes ess

In In Ge General:

A CPT for boolean Xi with k boolean parents has rows for the combinations of parent values Eac ach row requires one n number pi for Xi = true (the number for Xi = false is just 1-pi ) If eac ach va variab able has no more than k par arents ts, the complete network requires O( ) numbers For k<< n, this is a substantial improvement,

  • the numbers required grow linearly with n, vs. O(2n) for the

full joint distribution

slide-15
SLIDE 15

CPSC 322, Lecture 27 Slide 15

BN BNets ts: Co Const stru ructi tion

  • n Genera

ral l Se Sema manti tics

The full joint distribution can be defined as the product of conditional distributions: P P (X1, … ,Xn) = πi = 1 P(Xi | X1, … ,Xi-1) (chain rule) Simplify according to marginal&conditional independence

n

  • Express remaining dependencies as a network
  • Each var is a node
  • For each var, the conditioning vars are its parents
  • Associate to each node corresponding conditional

probabilities

P P (X1, … ,Xn) = πi = 1 P (Xi | Parents(Xi))

n

slide-16
SLIDE 16

CPSC 322, Lecture 27 Slide 16

BN BNet ets: s: Co Cons nstru truct ctio ion n Ge Gene nera ral l Se Sema mant ntic ics s (cont’)

n

P P (X1, … ,Xn) = πi = 1 P (Xi | Parents(Xi))

  • Every node is independent from its non-descendants

given it parents

slide-17
SLIDE 17

CPSC 322, Lecture 27 Slide 17

Lectu ture re Ov Overv rvie iew

  • Be

Beli lief f Ne Netw twor

  • rks
  • Buil

ild d sam ampl ple BN

  • Intro Inference, Compactness, Semantics
  • Mo

More Ex Exam ampl ples

slide-18
SLIDE 18

CPSC 322, Lecture 27 Slide 18

Ot Othe her r Exa xamp mple les: s: Fi Fire re Dia iagn gnos

  • sis

is (te (text xtboo

  • ok

k Ex.

  • x. 6.10)

Suppose you want to diagnose whether there is a fire in a building

  • you receive a noisy report about

whether everyone is leaving the building.

  • if everyone is leaving, this may

have been caused by a fire alarm.

  • if there is a fire alarm, it may

have been caused by a fire or by tampering

  • if there is a fire, there may be

smoke raising from the bldg.

slide-19
SLIDE 19

CPSC 322, Lecture 27 Slide 19

Other Examples (cont’)

  • Make sure you explore and understand the Fi

Fire Diagn gnos

  • sis

s example (we’ll expand on it to study Decision Networks)

  • Electrical Circuit example (textbook ex 6.11)
  • Patient’s wheezing and coughing example (ex.

6.14)

  • Several other examples on
slide-20
SLIDE 20

CPSC 322, Lecture 27 Slide 20

Rea eali list stic ic BN BNet et: Liv iver er D Dia iagn gnos

  • sis

is

Source: O Onisko et al al., 1 1999

slide-21
SLIDE 21

CPSC 322, Lecture 27 Slide 21

Rea eali list stic ic BN BNet et: Liv iver er D Dia iagn gnos

  • sis

is

Source: O Onisko et al al., 1 1999

slide-22
SLIDE 22

CPSC 322, Lecture 27 Slide 22

Rea eali list stic ic BN BNet et: Liv iver r Dia iagn gnos

  • sis

is

Source: Onisko et al al., 1 1999

JPD BN BNet A ~1018 ~103 B ~1030 ~1018 C ~1013 ~1014 D ~10 ~103

Assuming there are ~60 nodes in this Bnet with max number of parents =4; and assuming all nodes are binary, how many numbers are required for the JPD vs BNet

slide-23
SLIDE 23

CPSC 322, Lecture 27 Slide 23

Answerin ing Query u y unde der Un Uncertai ainty

Sta tati tic B Belief Netw twork

& Variable Elimination Dynamic Bayesian Network Probability Theory Hidden Markov Models Email spam filters Diagnostic Systems (e.g., medicine) Natural Language Processing Student Tracing in tutoring Systems Monitoring (e.g credit cards)

slide-24
SLIDE 24

CPSC 322, Lecture 27 Slide 24

Learning Goals for today’s class

Yo You c can an: Build a Belief Network for a simple domain Classify the types of inference Compute the representational saving in terms on number of probabilities required

slide-25
SLIDE 25

CPSC 322, Lecture 27 Slide 25

Next xt Cla lass ss (W (Wednesd sday!)

Bayesian Networks Representation

  • Ad

Addition

  • nal Dependencies

s encoded by BNets

  • More com
  • mpact represe

sentation

  • ns

s for CPT

  • Very simple but extremely useful Bnet (Ba

Bayes Class ssifier)

slide-26
SLIDE 26

CPSC 322, Lecture 27 Slide 26

Beli lief f netw twor

  • rk

k su summar ary

  • A belief network is a directed acyclic graph (DAG)

that effectively expresses independence assertions among random variables.

  • The parents of a node X are those variables on

which X directly depends.

  • Consideration of causal dependencies among

variables typically help in constructing a Bnet