More ore on on BN BNets ets str tructure ucture an and d - - PowerPoint PPT Presentation

more ore on on bn bnets ets str tructure ucture an and d
SMART_READER_LITE
LIVE PREVIEW

More ore on on BN BNets ets str tructure ucture an and d - - PowerPoint PPT Presentation

Re Reasoning asoning Un Unde der r Un Uncertainty: ertainty: More ore on on BN BNets ets str tructure ucture an and d cons onstruction truction Computer ter Sc Science ce cpsc3 c322 22, , Lectur ture e 28 (Te Text xtbo


slide-1
SLIDE 1

CPSC 322, Lecture 28 Slide 1

Re Reasoning asoning Un Unde der r Un Uncertainty: ertainty: More

  • re on
  • n BN

BNets ets str tructure ucture an and d cons

  • nstruction

truction

Computer ter Sc Science ce cpsc3 c322 22, , Lectur ture e 28 (Te Text xtbo book

  • k Chpt 6.3)

No Nov, , 14, 2012

slide-2
SLIDE 2

CPSC 322, Lecture 28 Slide 2

Belie lief f netw tworks

  • rks Recap

ap

  • By considering causal

al depende denc ncie ies, we order variables in the joint.

  • Ap

Apply…………………….. and simplify ify

  • Bu

Build a direct cted ed acycl clic ic graph (DAG) in which the parents of each var X are those vars on which X directly depends.

  • By

By constru tructi ction

  • n, a var is independent form it non-

descendant given its parents.

slide-3
SLIDE 3

CPSC 322, Lecture 28 Slide 3

Be Belief lief Networ tworks: ks: open n iss ssues ues

  • Compactn

ctnes ess: We reduce the number of probabilities from to In some domains we need to do better than that!

  • Indep

epend nden enci cies es: Does a BNet encode more independencies than the ones specified by construction?

  • Still too many and often there are no

data/experts for accurate assessment So Solutio tion: n: Make stronger (approximate) independence assumptions

slide-4
SLIDE 4

CPSC 322, Lecture 28 Slide 4

Lecture cture Ov Overview view

  • Implied Conditional Independence

relations in a Bnet

  • Compactness: Making stronger

Independence assumptions

  • Representation of Compact

Conditional Distributions

  • Network structure( Naïve Bayesian

Classifier)

slide-5
SLIDE 5

CPSC 322, Lecture 29 Slide 5

Bn Bnets: ets: En Enta tailed iled (in)depend )dependencies encies

Indep ep(Rep Repor

  • rt,

t, Fi Fire,{A {Ala larm rm})? })? Indep ep(Le Leav avin ing, g, Se SeeSm Smoke,{ e,{Fi Fire re})? })?

slide-6
SLIDE 6

CPSC 322, Lecture 28 Slide 6

Or, blocking paths for probability propagation. Three ways in which a path between X to Y can be blocked, (1 and 2 given evidence E )

Condit nditional ional In Independenci ependencies es

Z Z Z X Y E

Note that, in 3, X and Y become dependent as soon as I get evidence on Z or on any of its descendants

1 2 3

slide-7
SLIDE 7

CPSC 322, Lecture 28 Slide 7

Or ….Conditional Dependencies

Z Z Z X Y E

1 2 3

slide-8
SLIDE 8

CPSC 322, Lecture 28 Slide 8

In/D /Dep epend endenc encies ies in a Bn Bnet : Ex Example e 1

Z Z Z X Y E 1 2 3

Si Simple one

slide-9
SLIDE 9

CPSC 322, Lecture 28 Slide 9

In/D /Dep epend endenc encies ies in a Bn Bnet : Ex Example e 1

Is A conditionally independent of I given F?

Z Z Z X Y E 1 2 3

slide-10
SLIDE 10

CPSC 322, Lecture 28 Slide 10

In/D /Dep epend endenc encies ies in a Bn Bnet : Ex Example e 2

Is H conditionally independent of E given I?

Z Z Z X Y E 1 2 3

slide-11
SLIDE 11

CPSC 322, Lecture 28 Slide 11

Lecture cture Ov Overview view

  • Implied Conditional Independence

relations in a Bnet

  • Compactness: Making stronger

Independence assumptions

  • Representation of Compact

Conditional Distributions

  • Network structure( Naïve Bayesian

Classifier)

slide-12
SLIDE 12

CPSC 322, Lecture 28 Slide 12

Mo More e on

  • n C

Con

  • nstr

truction uction an and C d Com

  • mpa

pactness: tness: Com

  • mpa

pact ct Con

  • ndi

diti tion

  • nal

al Dis istributio tributions ns

Once we have established the topology of a Bnet, we still need to specify the conditional probabilities How?

  • Fr

From Data

  • Fr

From Ex Experts ts To To facilita litate te acquisi isitio tion, n, we we aim for compact ct repres esen entatio tations ns for which data/ex /expe perts rts can provid ide accur urate ate assess ssme ments nts

slide-13
SLIDE 13

CPSC 322, Lecture 28 Slide 13

Mo More e on

  • n C

Con

  • nstr

truction uction an and C d Com

  • mpa

pactness: tness: Com

  • mpa

pact ct Con

  • ndi

diti tion

  • nal

al Dis istributio tributions ns

From JointPD to But still, CPT grows exponentially with number of parents In realistic stic model of intern rnal al medicin ine with 448 nodes and 906 links 133,931,430 values are required! And often there are no data/experts for accurate assessment

slide-14
SLIDE 14

CPSC 322, Lecture 28 Slide 14

Ef Effect fect wit ith h mu mult ltip iple le no non-in inte terac ractin ing g cau auses es

Malaria

Fever

Cold

What do we need to specify? ify?

Flu

Malaria Flu

Cold

P(Fever=T | ..) P(Fever=F|..)

T T

T

T T

F

T F

T

T F

F

F T

T

F T

F

F F

T

F F

F

What do you think k data/e a/exp xper erts ts could ld easily ly tell you? you? More diffic ficul ult t to get info to asses ess s more complex ex conditioning….

slide-15
SLIDE 15

CPSC 322, Lecture 28 Slide 15

Sol

  • lut

utio ion: n: Noi

  • isy

sy-OR OR Dis istribution tributions

  • Models multiple non interacting causes
  • Logic OR with a probabilistic twist.

Malaria Flu Cold P(Fever=T | ..) P(Fever=F|..)

T T

T

T T

F

T F

T

T F

F

F T

T

F T

F

F F

T

F F

F

  • Logic OR Conditional Prob. Table.
slide-16
SLIDE 16

CPSC 322, Lecture 28 Slide 16

Sol

  • lut

utio ion: n: Noi

  • isy

sy-OR OR Dis istribution tributions

The No Noisy-OR OR model allows for uncert rtaint nty y in t the ability of each cause to generate ate the effect ct (e.g.. one may have a cold without a fever)

Two assumptions

  • 1. All possible causes a listed
  • 2. For each of the causes, whatever inhibits it to

generate the target effect is independent from the inhibitors of the other causes

Malaria Flu Cold P(Fever=T | ..) P(Fever=F|..)

T T T T T F T F T T F F F T T F T F F F T F F F

slide-17
SLIDE 17

CPSC 322, Lecture 28 Slide 17

Noi

  • isy

sy-OR: OR: Der eriv ivation ations s

For each of the causes, whatever inhibits it to generate the target effect is independent from the inhibitors of the other causes

Independe pendent nt Probability ility of failure e qi for each cause alone:

  • P(Effect=F | Ci = T, and no other causes) = qi
  • P(Effect=F | C1 = T,.. Cj = T, Cj+1 = F,., Ck = F)=
  • P(Effect=T | C1 = T,.. Cj = T, Cj+1 = F,., Ck = F) =

C1 Effect Ck

slide-18
SLIDE 18

CPSC 322, Lecture 28 Slide 18

Noi

  • isy

sy-OR: OR: Exam ampl ple

P(Fever=F| Cold=T, Flu=F, Malaria=F) = 0.6 P(Fever=F| Cold=F, Flu=T, Malaria=F) = 0.2 P(Fever=F| Cold=F, Flu=F, Malaria=T) = 0.1

  • P(Effect=F | C1 = T,.. Cj = T, Cj+1 = F,., Ck = F)= ∏j

i=1 qi

Model of internal medicine 133,931,430  8,254

Malaria Flu Cold P(Fever=T | ..) P(Fever=F|..) T T T 0.1 x 0.2 x 0.6 = 0.012 T T F 0.2 x 0.1 = 0 0.02 T F T 0.6 x 0.1=0.06 06 T F F 0.9 0.1 F T T 0.2 x 0.6 = 0.12 F T F 0.8 0.2 F F T 0.4 0.6 F F F 1.0

  • Number of probabilities linear in …..
slide-19
SLIDE 19

CPSC 322, Lecture 28 Slide 19

Lecture cture Ov Overview view

  • Implied Conditional Independence

relations in a Bnet

  • Compactness: Making stronger

Independence assumptions

  • Representation of Compact

Conditional Distributions

  • Network

twork str tructure cture ( N Naïve ïve Bayesian sian Classifier) assifier)

slide-20
SLIDE 20

Naïve Bayesian Classifier

A very simple and successful Bnets that allow to classify entities in a set of classes C, given a set of attributes Ex Example: le:

  • Determine whether an email is spam (only two

classes spam=T and spam=F)

  • Useful attributes of an email ?

As Assumptio ptions ns

  • The value of each attribute depends on the classification
  • (Na

Naïve) ïve) The attributes are independent of each other given the classification P(“bank” | “account” , spam=T) = P(“bank” | spam=T)

slide-21
SLIDE 21

Naïve Bayesian Classifier for Email Spam

Email Spam Email contains “free”

words Number of parameters?

  • What is the structur

cture? e?

Email contains “money” Email contains “ubc” Email contains “midterm”

As Assumptio ptions ns

  • The value of each attribute depends on the classification
  • (Na

Naïve) ïve) The attributes are independent of each other given the classification

If you have a large collection of emails for which you know if they are spam or not…… Easy to acquire?

slide-22
SLIDE 22

Most likely class given set of observations Is a given n Em Email E spam?

“free money for you now”

NB Classifier for Email Spam: Usage

Email Spam Email contains “free” Email contains “money” Email contains “ubc” Email contains “midterm”

Email is a spam if…….

slide-23
SLIDE 23

Fo For another ther example mple of f naïv ïve e Bayesian esian Classifier assifier

Se See textbo tbook

  • k ex. 6.16

he help lp syste stem m to determine what he help lp pa page ge a a us user er is is in inte teres ested ted in in based on th the k e key eyword

  • rds

s th they ey gi give e in in a qu a quer ery to a help system.

slide-24
SLIDE 24

CPSC 322, Lecture 4 Slide 24

Learning Goals for today’s class

Yo You u can an:

  • Given a Belief Net, determine whether one

variable is conditionally independent of another variable, given a set of observations.

  • Define and use Noi
  • isy

sy-OR OR distributions. Explain assumptions and benefit.

  • Implement and use a na

naïv ïve e Bay ayes esia ian n cla lassifier

  • ssifier. Explain assumptions and benefit.
slide-25
SLIDE 25

CPSC 322, Lecture 28 Slide 25

Next xt Class ss

  • Work on Practice Exercises 6A and 6B
  • Assignment 3 is due on Monday!
  • Assignment 4 will be available on Wednesday and

due on Nov the 28th (last class).

Course urse El Elements ments

Bayesian Networks Inference: Va Variable le El Eliminati ation

  • n