SlideShare uma empresa Scribd logo
Bayesian Networks: A Tutorial

                  Weng-Keen Wong
School of Electrical Engineering and Computer Science
                Oregon State University



                                                           1
           Weng-Keen Wong, Oregon State University ©2005
Introduction
                Suppose you are trying to determine
                 if a patient has inhalational
                 anthrax. You observe the
                 following symptoms:
                • The patient has a cough
                • The patient has a fever
                • The patient has difficulty
                  breathing




                                                 2
Weng-Keen Wong, Oregon State University ©2005
Introduction
                You would like to determine how
                likely the patient is infected with
                inhalational anthrax given that the
                patient has a cough, a fever, and
                difficulty breathing


               We are not 100% certain that the
               patient has anthrax because of these
               symptoms. We are dealing with
               uncertainty!


                                                      3
Weng-Keen Wong, Oregon State University ©2005
Introduction
                 Now suppose you order an x-ray
                 and observe that the patient has a
                 wide mediastinum.
                 Your belief that that the patient is
                 infected with inhalational anthrax is
                 now much higher.




                                                      4
Weng-Keen Wong, Oregon State University ©2005
Introduction
• In the previous slides, what you observed
  affected your belief that the patient is
  infected with anthrax
• This is called reasoning with uncertainty
• Wouldn’t it be nice if we had some
  methodology for reasoning with
  uncertainty? Why in fact, we do…


                                                           5
           Weng-Keen Wong, Oregon State University ©2005
Bayesian Networks
                             HasAnthrax




HasCough   HasFever     HasDifficultyBreathing             HasWideMediastinum

• In the opinion of many AI researchers, Bayesian
  networks are the most significant contribution in
  AI in the last 10 years
• They are used in many applications eg. spam
  filtering, speech recognition, robotics, diagnostic
  systems and even syndromic surveillance
                                                                            6
                Weng-Keen Wong, Oregon State University ©2005
Outline
1.   Introduction
2.   Probability Primer
3.   Bayesian networks
4.   Bayesian networks in syndromic
     surveillance




                                                          7
          Weng-Keen Wong, Oregon State University ©2005
Probability Primer: Random Variables
• A random variable is the basic element of
  probability
• Refers to an event and there is some degree
  of uncertainty as to the outcome of the
  event
• For example, the random variable A could
  be the event of getting a heads on a coin flip


                                                            8
            Weng-Keen Wong, Oregon State University ©2005
Boolean Random Variables
• We will start with the simplest type of random
  variables – Boolean ones
• Take the values true or false
• Think of the event as occurring or not occurring
• Examples (Let A be a Boolean random variable):
   A = Getting heads on a coin flip
   A = It will rain today
   A = The Cubs win the World Series in 2007


                                                             9
             Weng-Keen Wong, Oregon State University ©2005
Probabilities
We will write P(A = true) to mean the probability that A = true.
What is probability? It is the relative frequency with which an
outcome would be obtained if the process were repeated a large
number of times under similar conditions*


 The sum of the red
 and blue areas is 1
                                                                        P(A = true)




                                                    P(A = false)
  *
   Ahem…there’s also the Bayesian
  definition which says probability is
  your degree of belief in an outcome


                                                                                      10
                                Weng-Keen Wong, Oregon State University ©2005
Conditional Probability
• P(A = true | B = true) = Out of all the outcomes in which B
  is true, how many also have A equal to true
• Read this as: “Probability of A conditioned on B” or
  “Probability of A given B”

                                        H = “Have a headache”
                                        F = “Coming down with Flu”
     P(F = true)
                                        P(H = true) = 1/10
                                        P(F = true) = 1/40
                                        P(H = true | F = true) = 1/2

                                        “Headaches are rare and flu is rarer, but if
               P(H = true)              you’re coming down with flu there’s a
                                        50-50 chance you’ll have a headache.”

                                                                              11
                   Weng-Keen Wong, Oregon State University ©2005
The Joint Probability Distribution
• We will write P(A = true, B = true) to mean
  “the probability of A = true and B = true”
• Notice that:
                                              P(H=true|F=true)
        P(F = true)
                                               Area of " H and F" region
                                             =
                                                  Area of " F" region
                                               P(H = true, F = true)
                                             =
                                                   P(F = true)
                  P(H = true)
                                         In general, P(X|Y)=P(X,Y)/P(Y)
                                                                    12
               Weng-Keen Wong, Oregon State University ©2005
The Joint Probability Distribution
• Joint probabilities can be between                A       B      C      P(A,B,C)
  any number of variables                           false   false false 0.1
                                                    false   false true    0.2
  eg. P(A = true, B = true, C = true)
                                                    false   true   false 0.05
• For each combination of variables,
                                                    false   true   true   0.05
  we need to say how probable that                  true    false false 0.3
  combination is                                    true    false true    0.1
• The probabilities of these                        true    true   false 0.05
  combinations need to sum to 1                     true    true   true   0.15



                                                                          Sums to 1

                                                                                 13
                  Weng-Keen Wong, Oregon State University ©2005
The Joint Probability Distribution
                                                       A          B      C      P(A,B,C)
• Once you have the joint probability                  false      false false 0.1
  distribution, you can calculate any                  false      false true    0.2
  probability involving A, B, and C                    false      true   false 0.05
• Note: May need to use                                false      true   true   0.05
  marginalization and Bayes rule,                      true       false false 0.3
  (both of which are not discussed in
  these slides)                                        true       false true    0.1
                                                       true       true   false 0.05
                                                       true       true   true   0.15
Examples of things you can compute:
• P(A=true) = sum of P(A,B,C) in rows with A=true
• P(A=true, B = true | C=true) =
  P(A = true, B = true, C = true) / P(C = true)
                                                                                       14
                  Weng-Keen Wong, Oregon State University ©2005
The Problem with the Joint
             Distribution
• Lots of entries in the                      A       B      C      P(A,B,C)
  table to fill up!                           false   false false 0.1

• For k Boolean random                        false   false true    0.2
                                              false   true   false 0.05
  variables, you need a                       false   true   true   0.05
  table of size 2k                            true    false false 0.3
• How do we use fewer                         true    false true    0.1
                                              true    true   false 0.05
  numbers? Need the                           true    true   true   0.15
  concept of
  independence

                                                                           15
           Weng-Keen Wong, Oregon State University ©2005
Independence
Variables A and B are independent if any of
  the following hold:
• P(A,B) = P(A) P(B)
• P(A | B) = P(A)
• P(B | A) = P(B)
                        This says that knowing the outcome of
                        A does not tell me anything new about
                                   the outcome of B.

                                                           16
           Weng-Keen Wong, Oregon State University ©2005
Independence
How is independence useful?
• Suppose you have n coin flips and you want to
  calculate the joint distribution P(C1, …, Cn)
• If the coin flips are not independent, you need 2n
  values in the table
• If the coin flips are independent, then
                       n
   P (C1 ,..., Cn ) = ∏ P (Ci )            Each P(Ci) table has 2 entries
                      i =1                 and there are n of them for a
                                           total of 2n values

                                                                    17
              Weng-Keen Wong, Oregon State University ©2005
Conditional Independence
Variables A and B are conditionally
  independent given C if any of the following
  hold:
• P(A, B | C) = P(A | C) P(B | C)
• P(A | B, C) = P(A | C)
• P(B | A, C) = P(B | C)
Knowing C tells me everything about B. I don’t gain
anything by knowing A (either because A doesn’t
influence B or because knowing C provides all the
information knowing Wong, Oregon give)
              Weng-Keen
                        A would State University ©2005   18
Outline
1.   Introduction
2.   Probability Primer
3.   Bayesian networks
4.   Bayesian networks in syndromic
     surveillance




                                                          19
          Weng-Keen Wong, Oregon State University ©2005
A Bayesian Network
 A Bayesian network is made up of:
 1. A Directed Acyclic Graph
                                                  A


                                                  B

                                           C                 D

2. A set of tables for each node in the graph
   A       P(A)   A       B       P(B|A)   B          D          P(D|B)   B       C       P(C|B)
   false   0.6    false   false   0.01     false      false      0.02     false   false   0.4
   true    0.4    false   true    0.99     false      true       0.98     false   true    0.6
                  true    false   0.7      true       false      0.05     true    false   0.9
                  true    true    0.3      true       true       0.95     true    true    0.1
A Directed Acyclic Graph
Each node in the graph is a                       A node X is a parent of
random variable                                   another node Y if there is an
                                                  arrow from node X to node Y
                                       A          eg. A is a parent of B


                                       B

                                C             D

Informally, an arrow from
node X to node Y means X
has a direct influence on Y
                                                                          21
                   Weng-Keen Wong, Oregon State University ©2005
A Set of Tables for Each Node
A       P(A)                 A       B       P(B|A)           Each node Xi has a
false   0.6                  false   false   0.01
true    0.4                  false   true    0.99
                                                              conditional probability
                             true    false   0.7
                                                              distribution P(Xi | Parents(Xi))
                             true    true    0.3              that quantifies the effect of
                                                              the parents on the node
B       C       P(C|B)
false   false   0.4                                           The parameters are the
false   true    0.6           A                               probabilities in these
true    false   0.9                                           conditional probability tables
true    true    0.1                                           (CPTs)
                                 B
                                                      B        D       P(D|B)
                                                      false    false   0.02
                         C               D
                                                      false    true    0.98
                                                      true     false   0.05
                                                      true     true    0.95
A Set of Tables for Each Node
Conditional Probability
Distribution for C given B
   B       C       P(C|B)
   false   false   0.4
   false   true    0.6
   true    false   0.9
   true    true    0.1                 For a given combination of values of the parents (B
                                       in this example), the entries for P(C=true | B) and
                                       P(C=false | B) must add up to 1
                                       eg. P(C=true | B=false) + P(C=false |B=false )=1

 If you have a Boolean variable with k Boolean parents, this table
 has 2k+1 probabilities (but only 2k need to be stored)
                                                                                   23
                            Weng-Keen Wong, Oregon State University ©2005
Bayesian Networks
Two important properties:
2. Encodes the conditional independence
   relationships between the variables in the
   graph structure
3. Is a compact representation of the joint
   probability distribution over the variables



                                                           24
           Weng-Keen Wong, Oregon State University ©2005
Conditional Independence
The Markov condition: given its parents (P1, P2),
a node (X) is conditionally independent of its non-
descendants (ND1, ND2)

                     P1                P2


           ND1                X                 ND2


                    C1                 C2

                                                             25
             Weng-Keen Wong, Oregon State University ©2005
The Joint Probability Distribution
 Due to the Markov condition, we can compute
 the joint probability distribution over all the
 variables X1, …, Xn in the Bayesian net using
 the formula:
                                     n
 P ( X 1 = x1 ,..., X n = xn ) = ∏ P( X i = xi | Parents( X i ))
                                    i =1



Where Parents(Xi) means the values of the Parents of the node Xi
with respect to the graph

                                                                   26
                 Weng-Keen Wong, Oregon State University ©2005
Using a Bayesian Network Example
Using the network in the example, suppose you want to
calculate:
P(A = true, B = true, C = true, D = true)
= P(A = true) * P(B = true | A = true) *
  P(C = true | B = true) P( D = true | B = true)
= (0.4)*(0.3)*(0.1)*(0.95)                           A


                                                                  B

                                                              C       D

                                                                      27
              Weng-Keen Wong, Oregon State University ©2005
Using a Bayesian Network Example
Using the network in the example, suppose you want to
calculate:
                                                 This is from the
P(A = true, B = true, C = true, D = true)        graph structure
= P(A = true) * P(B = true | A = true) *
  P(C = true | B = true) P( D = true | B = true)
= (0.4)*(0.3)*(0.1)*(0.95)                            A


                                                                   B
 These numbers are from the
 conditional probability tables
                                                               C       D

                                                                       28
               Weng-Keen Wong, Oregon State University ©2005
Inference
• Using a Bayesian network to compute
  probabilities is called inference
• In general, inference involves queries of the form:
  P( X | E )
             E = The evidence variable(s)
       X = The query variable(s)




                                                              29
              Weng-Keen Wong, Oregon State University ©2005
Inference
                              HasAnthrax




 HasCough   HasFever     HasDifficultyBreathing             HasWideMediastinum


• An example of a query would be:
  P( HasAnthrax = true | HasFever = true, HasCough = true)
• Note: Even though HasDifficultyBreathing and
  HasWideMediastinum are in the Bayesian network, they are
  not given values in the query (ie. they do not appear either as
  query variables or evidence variables)
• They are treated as unobserved variables
                                                                            30
                 Weng-Keen Wong, Oregon State University ©2005
The Bad News
• Exact inference is feasible in small to
  medium-sized networks
• Exact inference in large networks takes a
  very long time
• We resort to approximate inference
  techniques which are much faster and give
  pretty good results


                                                           31
           Weng-Keen Wong, Oregon State University ©2005
One last unresolved issue…
We still haven’t said where we get the
  Bayesian network from. There are two
  options:
• Get an expert to design it
• Learn it from data




                                                          32
          Weng-Keen Wong, Oregon State University ©2005
Outline
1.   Introduction
2.   Probability Primer
3.   Bayesian networks
4.   Bayesian networks in syndromic
     surveillance




                                                          33
          Weng-Keen Wong, Oregon State University ©2005
Bayesian Networks in Syndromic
           Surveillance
                                                From: Goldenberg, A., Shmueli, G., Caruana,
                                                R. A., and Fienberg, S. E. (2002). Early
                                                statistical detection of anthrax outbreaks by
                                                tracking over-the-counter medication sales.
                                                Proceedings of the National Academy of
                                                Sciences (pp. 5237-5249)




• Syndromic surveillance systems traditionally
  monitor univariate time series
• With Bayesian networks, it allows us to model
  multivariate data and monitor it
                                                                                     34
            Weng-Keen Wong, Oregon State University ©2005
What’s Strange About Recent Events
             (WSARE) Algorithm
      Bayesian networks used to model the
      multivariate baseline distribution for ED data
     Date        Time       Gender       Age        Home          Many
                                                   Location       more…
    6/1/03       9:12         M          20s         NE            …
    6/1/03   10:45            F          40s         NE            …
    6/1/03   11:03            F          60s         NE            …
    6/1/03   11:07            M          60s          E            …
    6/1/03   12:15            M          60s          E            …
:            :          :            :         :              :




                                                                                         35
                                         Weng-Keen Wong, Oregon State University ©2005
Population-wide ANomaly Detection
      and Assessment (PANDA)
• A detector specifically for a large-scale
  outdoor release of inhalational anthrax
• Uses a massive causal Bayesian network
• Population-wide approach: each person in
  the population is represented as a
  subnetwork in the overall model



                                                           36
           Weng-Keen Wong, Oregon State University ©2005
Population-Wide Approach
               Anthrax Release                                  Global nodes

   Location of Release     Time of Release                          Interface nodes


                                                                    Each person in
Person Model     Person Model         Person Model
                                                                    the population

• Note the conditional independence
  assumptions
• Anthrax is infectious but non-contagious
                                                                                  37
                    Weng-Keen Wong, Oregon State University ©2005
Population-Wide Approach
               Anthrax Release                                  Global nodes

   Location of Release     Time of Release                          Interface nodes


                                                                    Each person in
Person Model     Person Model         Person Model
                                                                    the population

• Structure designed by expert judgment
• Parameters obtained from census data, training data,
  and expert assessments informed by literature and
  experience
                                                                                  38
                    Weng-Keen Wong, Oregon State University ©2005
Person Model (Initial Prototype)
                                                                       Anthrax Release




                                                     Time Of Release                Location of Release




                                                                                                                                                  …
…
                                                                Gender
                                               Age Decile                                                                       Age Decile              Gender

                                   Home Zip                                                                       Home Zip
                                                            Other ED                                                                         Other ED
Anthrax Infection                                            Disease           Anthrax Infection                                              Disease


                     Respiratory        Respiratory CC                                              Respiratory          Respiratory CC
                    from Anthrax         From Other                                                from Anthrax           From Other


                               Respiratory                                                                        Respiratory
                                  CC                                                                                 CC
             ED Admit                               ED Admit                                ED Admit                                 ED Admit
           from Anthrax                            from Other                             from Anthrax                              from Other

                              Respiratory CC                                                                 Respiratory CC
                              When Admitted                                                                  When Admitted



                               ED Admission                                                                   ED Admission
Person Model (Initial Prototype)
                                                                         Anthrax Release




                                                       Time Of Release                Location of Release




                                                                                                                                                     …
                                                                 Female
…                                                 20-30                                                                               50-60                Male
                                                                  Gender
                                                 Age Decile                                                                        Age Decile              Gender

                                   Home Zip                                                                         Home Zip
                                                              Other ED                                                                          Other ED
Anthrax Infection                  15213                       Disease           Anthrax Infection                   15146                       Disease


                     Respiratory           Respiratory CC                                             Respiratory            Respiratory CC
                    from Anthrax            From Other                                               from Anthrax             From Other


                               Respiratory                                                                          Respiratory
                                  CC                                                                                   CC
             ED Admit                                 ED Admit                               ED Admit                                   ED Admit
                                                                                                             Unknown
           from Anthrax       False                  from Other                            from Anthrax                                from Other

                              Respiratory CC                                                                   Respiratory CC
                              When Admitted                                                                    When Admitted



            Yesterday          ED Admission                                                      never          ED Admission
What else does this give you?
1. Can model information such as the spatial
   dispersion pattern, the progression of
   symptoms and the incubation period
2. Can combine evidence from ED and OTC
   data
3. Can infer a person’s work zip code from
   their home zip code
4. Can explain the model’s belief in an
   anthrax attack
                                                           41
           Weng-Keen Wong, Oregon State University ©2005
Acknowledgements
• Andrew Moore (for letting me copy
  material from his slides)
• Greg Cooper, John Levander, John
  Dowling, Denver Dash, Bill Hogan, Mike
  Wagner, and the rest of the RODS lab




                                                          42
          Weng-Keen Wong, Oregon State University ©2005
References
Bayesian networks:
• “Bayesian networks without tears” by Eugene Charniak
• “Artificial Intelligence: A Modern Approach” by Stuart
  Russell and Peter Norvig

Other references:
• My webpage
  http://www.eecs.oregonstate.edu/~wong
• PANDA webpage
  http://www.cbmi.pitt.edu/panda
• RODS webpage
  http://rods.health.pitt.edu/

                                                              43
              Weng-Keen Wong, Oregon State University ©2005

Mais conteúdo relacionado

Mais procurados

NAIVE BAYES CLASSIFIER
NAIVE BAYES CLASSIFIERNAIVE BAYES CLASSIFIER
NAIVE BAYES CLASSIFIERKnoldus Inc.
 
An introduction to Bayesian Statistics using Python
An introduction to Bayesian Statistics using PythonAn introduction to Bayesian Statistics using Python
An introduction to Bayesian Statistics using Pythonfreshdatabos
 
Uncertain Knowledge and Reasoning in Artificial Intelligence
Uncertain Knowledge and Reasoning in Artificial IntelligenceUncertain Knowledge and Reasoning in Artificial Intelligence
Uncertain Knowledge and Reasoning in Artificial IntelligenceExperfy
 
2.5 backpropagation
2.5 backpropagation2.5 backpropagation
2.5 backpropagationKrish_ver2
 
Bayesian networks in AI
Bayesian networks in AIBayesian networks in AI
Bayesian networks in AIByoung-Hee Kim
 
Machine Learning 3 - Decision Tree Learning
Machine Learning 3 - Decision Tree LearningMachine Learning 3 - Decision Tree Learning
Machine Learning 3 - Decision Tree Learningbutest
 
Perceptron (neural network)
Perceptron (neural network)Perceptron (neural network)
Perceptron (neural network)EdutechLearners
 
Unit I & II in Principles of Soft computing
Unit I & II in Principles of Soft computing Unit I & II in Principles of Soft computing
Unit I & II in Principles of Soft computing Sivagowry Shathesh
 
Ensemble learning
Ensemble learningEnsemble learning
Ensemble learningHaris Jamil
 
Dimensionality Reduction
Dimensionality ReductionDimensionality Reduction
Dimensionality Reductionmrizwan969
 
Classification Based Machine Learning Algorithms
Classification Based Machine Learning AlgorithmsClassification Based Machine Learning Algorithms
Classification Based Machine Learning AlgorithmsMd. Main Uddin Rony
 
Performance Evaluation for Classifiers tutorial
Performance Evaluation for Classifiers tutorialPerformance Evaluation for Classifiers tutorial
Performance Evaluation for Classifiers tutorialBilkent University
 
Naive Bayes Classifier
Naive Bayes ClassifierNaive Bayes Classifier
Naive Bayes ClassifierArunabha Saha
 
K-Nearest Neighbor Classifier
K-Nearest Neighbor ClassifierK-Nearest Neighbor Classifier
K-Nearest Neighbor ClassifierNeha Kulkarni
 

Mais procurados (20)

AI Lecture 7 (uncertainty)
AI Lecture 7 (uncertainty)AI Lecture 7 (uncertainty)
AI Lecture 7 (uncertainty)
 
NAIVE BAYES CLASSIFIER
NAIVE BAYES CLASSIFIERNAIVE BAYES CLASSIFIER
NAIVE BAYES CLASSIFIER
 
An introduction to Bayesian Statistics using Python
An introduction to Bayesian Statistics using PythonAn introduction to Bayesian Statistics using Python
An introduction to Bayesian Statistics using Python
 
Uncertain Knowledge and Reasoning in Artificial Intelligence
Uncertain Knowledge and Reasoning in Artificial IntelligenceUncertain Knowledge and Reasoning in Artificial Intelligence
Uncertain Knowledge and Reasoning in Artificial Intelligence
 
2.5 backpropagation
2.5 backpropagation2.5 backpropagation
2.5 backpropagation
 
Bayesian networks in AI
Bayesian networks in AIBayesian networks in AI
Bayesian networks in AI
 
Machine Learning 3 - Decision Tree Learning
Machine Learning 3 - Decision Tree LearningMachine Learning 3 - Decision Tree Learning
Machine Learning 3 - Decision Tree Learning
 
Perceptron (neural network)
Perceptron (neural network)Perceptron (neural network)
Perceptron (neural network)
 
Unit I & II in Principles of Soft computing
Unit I & II in Principles of Soft computing Unit I & II in Principles of Soft computing
Unit I & II in Principles of Soft computing
 
Decision tree and random forest
Decision tree and random forestDecision tree and random forest
Decision tree and random forest
 
Ensemble learning
Ensemble learningEnsemble learning
Ensemble learning
 
linear classification
linear classificationlinear classification
linear classification
 
Machine Learning: Bias and Variance Trade-off
Machine Learning: Bias and Variance Trade-offMachine Learning: Bias and Variance Trade-off
Machine Learning: Bias and Variance Trade-off
 
Support Vector Machines ( SVM )
Support Vector Machines ( SVM ) Support Vector Machines ( SVM )
Support Vector Machines ( SVM )
 
Dimensionality Reduction
Dimensionality ReductionDimensionality Reduction
Dimensionality Reduction
 
Classification Based Machine Learning Algorithms
Classification Based Machine Learning AlgorithmsClassification Based Machine Learning Algorithms
Classification Based Machine Learning Algorithms
 
Performance Evaluation for Classifiers tutorial
Performance Evaluation for Classifiers tutorialPerformance Evaluation for Classifiers tutorial
Performance Evaluation for Classifiers tutorial
 
Gradient descent method
Gradient descent methodGradient descent method
Gradient descent method
 
Naive Bayes Classifier
Naive Bayes ClassifierNaive Bayes Classifier
Naive Bayes Classifier
 
K-Nearest Neighbor Classifier
K-Nearest Neighbor ClassifierK-Nearest Neighbor Classifier
K-Nearest Neighbor Classifier
 

Destaque

Bayesian Belief Networks for dummies
Bayesian Belief Networks for dummiesBayesian Belief Networks for dummies
Bayesian Belief Networks for dummiesGilad Barkan
 
Understanding your data with Bayesian networks (in Python) by Bartek Wilczyns...
Understanding your data with Bayesian networks (in Python) by Bartek Wilczyns...Understanding your data with Bayesian networks (in Python) by Bartek Wilczyns...
Understanding your data with Bayesian networks (in Python) by Bartek Wilczyns...PyData
 
Bayesian Network Modeling using Python and R
Bayesian Network Modeling using Python and RBayesian Network Modeling using Python and R
Bayesian Network Modeling using Python and RPyData
 
An Introduction to Causal Discovery, a Bayesian Network Approach
An Introduction to Causal Discovery, a Bayesian Network ApproachAn Introduction to Causal Discovery, a Bayesian Network Approach
An Introduction to Causal Discovery, a Bayesian Network ApproachCOST action BM1006
 
Bayesian Networks with R and Hadoop
Bayesian Networks with R and HadoopBayesian Networks with R and Hadoop
Bayesian Networks with R and HadoopOfer Mendelevitch
 
Introduction to bayesian_networks[1]
Introduction to bayesian_networks[1]Introduction to bayesian_networks[1]
Introduction to bayesian_networks[1]JULIO GONZALEZ SANZ
 
Lecture 1 graphical models
Lecture 1  graphical modelsLecture 1  graphical models
Lecture 1 graphical modelsDuy Tung Pham
 
Bayesian Classification
Bayesian ClassificationBayesian Classification
Bayesian ClassificationGang Tao
 
551report.doc
551report.doc551report.doc
551report.docbutest
 
Bayesian scoring functions for Bayesian Belief Networks
Bayesian scoring functions for Bayesian Belief NetworksBayesian scoring functions for Bayesian Belief Networks
Bayesian scoring functions for Bayesian Belief NetworksJee Vang, Ph.D.
 
Introduction to machine learning
Introduction to machine learningIntroduction to machine learning
Introduction to machine learningbutest
 

Destaque (20)

Bayesian Belief Networks for dummies
Bayesian Belief Networks for dummiesBayesian Belief Networks for dummies
Bayesian Belief Networks for dummies
 
Understanding your data with Bayesian networks (in Python) by Bartek Wilczyns...
Understanding your data with Bayesian networks (in Python) by Bartek Wilczyns...Understanding your data with Bayesian networks (in Python) by Bartek Wilczyns...
Understanding your data with Bayesian networks (in Python) by Bartek Wilczyns...
 
Bayesian Network Modeling using Python and R
Bayesian Network Modeling using Python and RBayesian Network Modeling using Python and R
Bayesian Network Modeling using Python and R
 
Bayesian network
Bayesian networkBayesian network
Bayesian network
 
An Introduction to Causal Discovery, a Bayesian Network Approach
An Introduction to Causal Discovery, a Bayesian Network ApproachAn Introduction to Causal Discovery, a Bayesian Network Approach
An Introduction to Causal Discovery, a Bayesian Network Approach
 
Bayesian Networks with R and Hadoop
Bayesian Networks with R and HadoopBayesian Networks with R and Hadoop
Bayesian Networks with R and Hadoop
 
Hidden markov model
Hidden markov modelHidden markov model
Hidden markov model
 
Hidden markov model ppt
Hidden markov model pptHidden markov model ppt
Hidden markov model ppt
 
Introduction to bayesian_networks[1]
Introduction to bayesian_networks[1]Introduction to bayesian_networks[1]
Introduction to bayesian_networks[1]
 
Lecture 1 graphical models
Lecture 1  graphical modelsLecture 1  graphical models
Lecture 1 graphical models
 
Bayesian Classification
Bayesian ClassificationBayesian Classification
Bayesian Classification
 
Probability function
Probability functionProbability function
Probability function
 
551report.doc
551report.doc551report.doc
551report.doc
 
Dbm630 lecture06
Dbm630 lecture06Dbm630 lecture06
Dbm630 lecture06
 
Bayesian scoring functions for Bayesian Belief Networks
Bayesian scoring functions for Bayesian Belief NetworksBayesian scoring functions for Bayesian Belief Networks
Bayesian scoring functions for Bayesian Belief Networks
 
Presentación1
Presentación1Presentación1
Presentación1
 
About the LoMRF project
About the LoMRF projectAbout the LoMRF project
About the LoMRF project
 
Introduction to machine learning
Introduction to machine learningIntroduction to machine learning
Introduction to machine learning
 
Unit 1-probability
Unit 1-probabilityUnit 1-probability
Unit 1-probability
 
Bayes Belief Network
Bayes Belief NetworkBayes Belief Network
Bayes Belief Network
 

Semelhante a Bayesian networks

ch15BayesNet.ppt
ch15BayesNet.pptch15BayesNet.ppt
ch15BayesNet.pptLallHussain
 
Bayesian Networks Model in Step By Steps
Bayesian Networks Model in Step By StepsBayesian Networks Model in Step By Steps
Bayesian Networks Model in Step By StepsFerry Wahyu Wibowo
 
El espionaje de datos y la falacia de las pruebas múltiples
El espionaje de datos y la falacia de las pruebas múltiplesEl espionaje de datos y la falacia de las pruebas múltiples
El espionaje de datos y la falacia de las pruebas múltiplesafgallegos1997
 
Probability Distribution
Probability DistributionProbability Distribution
Probability DistributionShahnawazAli81
 
Basis of statistical inference
Basis of statistical inferenceBasis of statistical inference
Basis of statistical inferencezahidacademy
 
Hypothesis Testing.pptx
Hypothesis Testing.pptxHypothesis Testing.pptx
Hypothesis Testing.pptxheencomm
 
NAVEEN KUMAR CONDITIONAL PROBABILITY COLLEGE ROLL-237094034 (1).pptx
NAVEEN KUMAR CONDITIONAL PROBABILITY COLLEGE ROLL-237094034 (1).pptxNAVEEN KUMAR CONDITIONAL PROBABILITY COLLEGE ROLL-237094034 (1).pptx
NAVEEN KUMAR CONDITIONAL PROBABILITY COLLEGE ROLL-237094034 (1).pptxBARUNSINGH43
 
The replication crisis: are P-values the problem and are Bayes factors the so...
The replication crisis: are P-values the problem and are Bayes factors the so...The replication crisis: are P-values the problem and are Bayes factors the so...
The replication crisis: are P-values the problem and are Bayes factors the so...StephenSenn2
 
The replication crisis: are P-values the problem and are Bayes factors the so...
The replication crisis: are P-values the problem and are Bayes factors the so...The replication crisis: are P-values the problem and are Bayes factors the so...
The replication crisis: are P-values the problem and are Bayes factors the so...jemille6
 
Probability&Bayes theorem
Probability&Bayes theoremProbability&Bayes theorem
Probability&Bayes theoremimran iqbal
 
Review Z Test Ci 1
Review Z Test Ci 1Review Z Test Ci 1
Review Z Test Ci 1shoffma5
 
Statistics in clinical and translational research common pitfalls
Statistics in clinical and translational research  common pitfallsStatistics in clinical and translational research  common pitfalls
Statistics in clinical and translational research common pitfallsPavlos Msaouel, MD, PhD
 
artificial intelligence study material for unit 2
artificial intelligence study material for unit 2artificial intelligence study material for unit 2
artificial intelligence study material for unit 2krishshanmuga2
 

Semelhante a Bayesian networks (15)

ch15BayesNet.ppt
ch15BayesNet.pptch15BayesNet.ppt
ch15BayesNet.ppt
 
Bayesian Networks Model in Step By Steps
Bayesian Networks Model in Step By StepsBayesian Networks Model in Step By Steps
Bayesian Networks Model in Step By Steps
 
El espionaje de datos y la falacia de las pruebas múltiples
El espionaje de datos y la falacia de las pruebas múltiplesEl espionaje de datos y la falacia de las pruebas múltiples
El espionaje de datos y la falacia de las pruebas múltiples
 
Bayesian Networks
Bayesian NetworksBayesian Networks
Bayesian Networks
 
Probability Distribution
Probability DistributionProbability Distribution
Probability Distribution
 
Ai 7
Ai 7Ai 7
Ai 7
 
Basis of statistical inference
Basis of statistical inferenceBasis of statistical inference
Basis of statistical inference
 
Hypothesis Testing.pptx
Hypothesis Testing.pptxHypothesis Testing.pptx
Hypothesis Testing.pptx
 
NAVEEN KUMAR CONDITIONAL PROBABILITY COLLEGE ROLL-237094034 (1).pptx
NAVEEN KUMAR CONDITIONAL PROBABILITY COLLEGE ROLL-237094034 (1).pptxNAVEEN KUMAR CONDITIONAL PROBABILITY COLLEGE ROLL-237094034 (1).pptx
NAVEEN KUMAR CONDITIONAL PROBABILITY COLLEGE ROLL-237094034 (1).pptx
 
The replication crisis: are P-values the problem and are Bayes factors the so...
The replication crisis: are P-values the problem and are Bayes factors the so...The replication crisis: are P-values the problem and are Bayes factors the so...
The replication crisis: are P-values the problem and are Bayes factors the so...
 
The replication crisis: are P-values the problem and are Bayes factors the so...
The replication crisis: are P-values the problem and are Bayes factors the so...The replication crisis: are P-values the problem and are Bayes factors the so...
The replication crisis: are P-values the problem and are Bayes factors the so...
 
Probability&Bayes theorem
Probability&Bayes theoremProbability&Bayes theorem
Probability&Bayes theorem
 
Review Z Test Ci 1
Review Z Test Ci 1Review Z Test Ci 1
Review Z Test Ci 1
 
Statistics in clinical and translational research common pitfalls
Statistics in clinical and translational research  common pitfallsStatistics in clinical and translational research  common pitfalls
Statistics in clinical and translational research common pitfalls
 
artificial intelligence study material for unit 2
artificial intelligence study material for unit 2artificial intelligence study material for unit 2
artificial intelligence study material for unit 2
 

Último

The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...sanghavirahi2
 
IATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdffIATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdff17thcssbs2
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaasiemaillard
 
How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17Celine George
 
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfQucHHunhnh
 
size separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceuticssize separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceuticspragatimahajan3
 
Championnat de France de Tennis de table/
Championnat de France de Tennis de table/Championnat de France de Tennis de table/
Championnat de France de Tennis de table/siemaillard
 
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdfTelling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdfTechSoup
 
Gyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxGyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxShibin Azad
 
Neurulation and the formation of the neural tube
Neurulation and the formation of the neural tubeNeurulation and the formation of the neural tube
Neurulation and the formation of the neural tubeSaadHumayun7
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...Sayali Powar
 
Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).Mohamed Rizk Khodair
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsCol Mukteshwar Prasad
 
ppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyesppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyesashishpaul799
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryEugene Lysak
 
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & EngineeringBasic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & EngineeringDenish Jangid
 
....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdfVikramadityaRaj
 

Último (20)

The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...
 
IATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdffIATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdff
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17
 
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
 
size separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceuticssize separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceutics
 
Championnat de France de Tennis de table/
Championnat de France de Tennis de table/Championnat de France de Tennis de table/
Championnat de France de Tennis de table/
 
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
Operations Management - Book1.p  - Dr. Abdulfatah A. SalemOperations Management - Book1.p  - Dr. Abdulfatah A. Salem
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
 
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdfTelling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
 
Gyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxGyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptx
 
Neurulation and the formation of the neural tube
Neurulation and the formation of the neural tubeNeurulation and the formation of the neural tube
Neurulation and the formation of the neural tube
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
 
Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
B.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdfB.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdf
 
ppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyesppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyes
 
Word Stress rules esl .pptx
Word Stress rules esl               .pptxWord Stress rules esl               .pptx
Word Stress rules esl .pptx
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. Henry
 
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & EngineeringBasic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
 
....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf
 

Bayesian networks

  • 1. Bayesian Networks: A Tutorial Weng-Keen Wong School of Electrical Engineering and Computer Science Oregon State University 1 Weng-Keen Wong, Oregon State University ©2005
  • 2. Introduction Suppose you are trying to determine if a patient has inhalational anthrax. You observe the following symptoms: • The patient has a cough • The patient has a fever • The patient has difficulty breathing 2 Weng-Keen Wong, Oregon State University ©2005
  • 3. Introduction You would like to determine how likely the patient is infected with inhalational anthrax given that the patient has a cough, a fever, and difficulty breathing We are not 100% certain that the patient has anthrax because of these symptoms. We are dealing with uncertainty! 3 Weng-Keen Wong, Oregon State University ©2005
  • 4. Introduction Now suppose you order an x-ray and observe that the patient has a wide mediastinum. Your belief that that the patient is infected with inhalational anthrax is now much higher. 4 Weng-Keen Wong, Oregon State University ©2005
  • 5. Introduction • In the previous slides, what you observed affected your belief that the patient is infected with anthrax • This is called reasoning with uncertainty • Wouldn’t it be nice if we had some methodology for reasoning with uncertainty? Why in fact, we do… 5 Weng-Keen Wong, Oregon State University ©2005
  • 6. Bayesian Networks HasAnthrax HasCough HasFever HasDifficultyBreathing HasWideMediastinum • In the opinion of many AI researchers, Bayesian networks are the most significant contribution in AI in the last 10 years • They are used in many applications eg. spam filtering, speech recognition, robotics, diagnostic systems and even syndromic surveillance 6 Weng-Keen Wong, Oregon State University ©2005
  • 7. Outline 1. Introduction 2. Probability Primer 3. Bayesian networks 4. Bayesian networks in syndromic surveillance 7 Weng-Keen Wong, Oregon State University ©2005
  • 8. Probability Primer: Random Variables • A random variable is the basic element of probability • Refers to an event and there is some degree of uncertainty as to the outcome of the event • For example, the random variable A could be the event of getting a heads on a coin flip 8 Weng-Keen Wong, Oregon State University ©2005
  • 9. Boolean Random Variables • We will start with the simplest type of random variables – Boolean ones • Take the values true or false • Think of the event as occurring or not occurring • Examples (Let A be a Boolean random variable): A = Getting heads on a coin flip A = It will rain today A = The Cubs win the World Series in 2007 9 Weng-Keen Wong, Oregon State University ©2005
  • 10. Probabilities We will write P(A = true) to mean the probability that A = true. What is probability? It is the relative frequency with which an outcome would be obtained if the process were repeated a large number of times under similar conditions* The sum of the red and blue areas is 1 P(A = true) P(A = false) * Ahem…there’s also the Bayesian definition which says probability is your degree of belief in an outcome 10 Weng-Keen Wong, Oregon State University ©2005
  • 11. Conditional Probability • P(A = true | B = true) = Out of all the outcomes in which B is true, how many also have A equal to true • Read this as: “Probability of A conditioned on B” or “Probability of A given B” H = “Have a headache” F = “Coming down with Flu” P(F = true) P(H = true) = 1/10 P(F = true) = 1/40 P(H = true | F = true) = 1/2 “Headaches are rare and flu is rarer, but if P(H = true) you’re coming down with flu there’s a 50-50 chance you’ll have a headache.” 11 Weng-Keen Wong, Oregon State University ©2005
  • 12. The Joint Probability Distribution • We will write P(A = true, B = true) to mean “the probability of A = true and B = true” • Notice that: P(H=true|F=true) P(F = true) Area of " H and F" region = Area of " F" region P(H = true, F = true) = P(F = true) P(H = true) In general, P(X|Y)=P(X,Y)/P(Y) 12 Weng-Keen Wong, Oregon State University ©2005
  • 13. The Joint Probability Distribution • Joint probabilities can be between A B C P(A,B,C) any number of variables false false false 0.1 false false true 0.2 eg. P(A = true, B = true, C = true) false true false 0.05 • For each combination of variables, false true true 0.05 we need to say how probable that true false false 0.3 combination is true false true 0.1 • The probabilities of these true true false 0.05 combinations need to sum to 1 true true true 0.15 Sums to 1 13 Weng-Keen Wong, Oregon State University ©2005
  • 14. The Joint Probability Distribution A B C P(A,B,C) • Once you have the joint probability false false false 0.1 distribution, you can calculate any false false true 0.2 probability involving A, B, and C false true false 0.05 • Note: May need to use false true true 0.05 marginalization and Bayes rule, true false false 0.3 (both of which are not discussed in these slides) true false true 0.1 true true false 0.05 true true true 0.15 Examples of things you can compute: • P(A=true) = sum of P(A,B,C) in rows with A=true • P(A=true, B = true | C=true) = P(A = true, B = true, C = true) / P(C = true) 14 Weng-Keen Wong, Oregon State University ©2005
  • 15. The Problem with the Joint Distribution • Lots of entries in the A B C P(A,B,C) table to fill up! false false false 0.1 • For k Boolean random false false true 0.2 false true false 0.05 variables, you need a false true true 0.05 table of size 2k true false false 0.3 • How do we use fewer true false true 0.1 true true false 0.05 numbers? Need the true true true 0.15 concept of independence 15 Weng-Keen Wong, Oregon State University ©2005
  • 16. Independence Variables A and B are independent if any of the following hold: • P(A,B) = P(A) P(B) • P(A | B) = P(A) • P(B | A) = P(B) This says that knowing the outcome of A does not tell me anything new about the outcome of B. 16 Weng-Keen Wong, Oregon State University ©2005
  • 17. Independence How is independence useful? • Suppose you have n coin flips and you want to calculate the joint distribution P(C1, …, Cn) • If the coin flips are not independent, you need 2n values in the table • If the coin flips are independent, then n P (C1 ,..., Cn ) = ∏ P (Ci ) Each P(Ci) table has 2 entries i =1 and there are n of them for a total of 2n values 17 Weng-Keen Wong, Oregon State University ©2005
  • 18. Conditional Independence Variables A and B are conditionally independent given C if any of the following hold: • P(A, B | C) = P(A | C) P(B | C) • P(A | B, C) = P(A | C) • P(B | A, C) = P(B | C) Knowing C tells me everything about B. I don’t gain anything by knowing A (either because A doesn’t influence B or because knowing C provides all the information knowing Wong, Oregon give) Weng-Keen A would State University ©2005 18
  • 19. Outline 1. Introduction 2. Probability Primer 3. Bayesian networks 4. Bayesian networks in syndromic surveillance 19 Weng-Keen Wong, Oregon State University ©2005
  • 20. A Bayesian Network A Bayesian network is made up of: 1. A Directed Acyclic Graph A B C D 2. A set of tables for each node in the graph A P(A) A B P(B|A) B D P(D|B) B C P(C|B) false 0.6 false false 0.01 false false 0.02 false false 0.4 true 0.4 false true 0.99 false true 0.98 false true 0.6 true false 0.7 true false 0.05 true false 0.9 true true 0.3 true true 0.95 true true 0.1
  • 21. A Directed Acyclic Graph Each node in the graph is a A node X is a parent of random variable another node Y if there is an arrow from node X to node Y A eg. A is a parent of B B C D Informally, an arrow from node X to node Y means X has a direct influence on Y 21 Weng-Keen Wong, Oregon State University ©2005
  • 22. A Set of Tables for Each Node A P(A) A B P(B|A) Each node Xi has a false 0.6 false false 0.01 true 0.4 false true 0.99 conditional probability true false 0.7 distribution P(Xi | Parents(Xi)) true true 0.3 that quantifies the effect of the parents on the node B C P(C|B) false false 0.4 The parameters are the false true 0.6 A probabilities in these true false 0.9 conditional probability tables true true 0.1 (CPTs) B B D P(D|B) false false 0.02 C D false true 0.98 true false 0.05 true true 0.95
  • 23. A Set of Tables for Each Node Conditional Probability Distribution for C given B B C P(C|B) false false 0.4 false true 0.6 true false 0.9 true true 0.1 For a given combination of values of the parents (B in this example), the entries for P(C=true | B) and P(C=false | B) must add up to 1 eg. P(C=true | B=false) + P(C=false |B=false )=1 If you have a Boolean variable with k Boolean parents, this table has 2k+1 probabilities (but only 2k need to be stored) 23 Weng-Keen Wong, Oregon State University ©2005
  • 24. Bayesian Networks Two important properties: 2. Encodes the conditional independence relationships between the variables in the graph structure 3. Is a compact representation of the joint probability distribution over the variables 24 Weng-Keen Wong, Oregon State University ©2005
  • 25. Conditional Independence The Markov condition: given its parents (P1, P2), a node (X) is conditionally independent of its non- descendants (ND1, ND2) P1 P2 ND1 X ND2 C1 C2 25 Weng-Keen Wong, Oregon State University ©2005
  • 26. The Joint Probability Distribution Due to the Markov condition, we can compute the joint probability distribution over all the variables X1, …, Xn in the Bayesian net using the formula: n P ( X 1 = x1 ,..., X n = xn ) = ∏ P( X i = xi | Parents( X i )) i =1 Where Parents(Xi) means the values of the Parents of the node Xi with respect to the graph 26 Weng-Keen Wong, Oregon State University ©2005
  • 27. Using a Bayesian Network Example Using the network in the example, suppose you want to calculate: P(A = true, B = true, C = true, D = true) = P(A = true) * P(B = true | A = true) * P(C = true | B = true) P( D = true | B = true) = (0.4)*(0.3)*(0.1)*(0.95) A B C D 27 Weng-Keen Wong, Oregon State University ©2005
  • 28. Using a Bayesian Network Example Using the network in the example, suppose you want to calculate: This is from the P(A = true, B = true, C = true, D = true) graph structure = P(A = true) * P(B = true | A = true) * P(C = true | B = true) P( D = true | B = true) = (0.4)*(0.3)*(0.1)*(0.95) A B These numbers are from the conditional probability tables C D 28 Weng-Keen Wong, Oregon State University ©2005
  • 29. Inference • Using a Bayesian network to compute probabilities is called inference • In general, inference involves queries of the form: P( X | E ) E = The evidence variable(s) X = The query variable(s) 29 Weng-Keen Wong, Oregon State University ©2005
  • 30. Inference HasAnthrax HasCough HasFever HasDifficultyBreathing HasWideMediastinum • An example of a query would be: P( HasAnthrax = true | HasFever = true, HasCough = true) • Note: Even though HasDifficultyBreathing and HasWideMediastinum are in the Bayesian network, they are not given values in the query (ie. they do not appear either as query variables or evidence variables) • They are treated as unobserved variables 30 Weng-Keen Wong, Oregon State University ©2005
  • 31. The Bad News • Exact inference is feasible in small to medium-sized networks • Exact inference in large networks takes a very long time • We resort to approximate inference techniques which are much faster and give pretty good results 31 Weng-Keen Wong, Oregon State University ©2005
  • 32. One last unresolved issue… We still haven’t said where we get the Bayesian network from. There are two options: • Get an expert to design it • Learn it from data 32 Weng-Keen Wong, Oregon State University ©2005
  • 33. Outline 1. Introduction 2. Probability Primer 3. Bayesian networks 4. Bayesian networks in syndromic surveillance 33 Weng-Keen Wong, Oregon State University ©2005
  • 34. Bayesian Networks in Syndromic Surveillance From: Goldenberg, A., Shmueli, G., Caruana, R. A., and Fienberg, S. E. (2002). Early statistical detection of anthrax outbreaks by tracking over-the-counter medication sales. Proceedings of the National Academy of Sciences (pp. 5237-5249) • Syndromic surveillance systems traditionally monitor univariate time series • With Bayesian networks, it allows us to model multivariate data and monitor it 34 Weng-Keen Wong, Oregon State University ©2005
  • 35. What’s Strange About Recent Events (WSARE) Algorithm Bayesian networks used to model the multivariate baseline distribution for ED data Date Time Gender Age Home Many Location more… 6/1/03 9:12 M 20s NE … 6/1/03 10:45 F 40s NE … 6/1/03 11:03 F 60s NE … 6/1/03 11:07 M 60s E … 6/1/03 12:15 M 60s E … : : : : : : 35 Weng-Keen Wong, Oregon State University ©2005
  • 36. Population-wide ANomaly Detection and Assessment (PANDA) • A detector specifically for a large-scale outdoor release of inhalational anthrax • Uses a massive causal Bayesian network • Population-wide approach: each person in the population is represented as a subnetwork in the overall model 36 Weng-Keen Wong, Oregon State University ©2005
  • 37. Population-Wide Approach Anthrax Release Global nodes Location of Release Time of Release Interface nodes Each person in Person Model Person Model Person Model the population • Note the conditional independence assumptions • Anthrax is infectious but non-contagious 37 Weng-Keen Wong, Oregon State University ©2005
  • 38. Population-Wide Approach Anthrax Release Global nodes Location of Release Time of Release Interface nodes Each person in Person Model Person Model Person Model the population • Structure designed by expert judgment • Parameters obtained from census data, training data, and expert assessments informed by literature and experience 38 Weng-Keen Wong, Oregon State University ©2005
  • 39. Person Model (Initial Prototype) Anthrax Release Time Of Release Location of Release … … Gender Age Decile Age Decile Gender Home Zip Home Zip Other ED Other ED Anthrax Infection Disease Anthrax Infection Disease Respiratory Respiratory CC Respiratory Respiratory CC from Anthrax From Other from Anthrax From Other Respiratory Respiratory CC CC ED Admit ED Admit ED Admit ED Admit from Anthrax from Other from Anthrax from Other Respiratory CC Respiratory CC When Admitted When Admitted ED Admission ED Admission
  • 40. Person Model (Initial Prototype) Anthrax Release Time Of Release Location of Release … Female … 20-30 50-60 Male Gender Age Decile Age Decile Gender Home Zip Home Zip Other ED Other ED Anthrax Infection 15213 Disease Anthrax Infection 15146 Disease Respiratory Respiratory CC Respiratory Respiratory CC from Anthrax From Other from Anthrax From Other Respiratory Respiratory CC CC ED Admit ED Admit ED Admit ED Admit Unknown from Anthrax False from Other from Anthrax from Other Respiratory CC Respiratory CC When Admitted When Admitted Yesterday ED Admission never ED Admission
  • 41. What else does this give you? 1. Can model information such as the spatial dispersion pattern, the progression of symptoms and the incubation period 2. Can combine evidence from ED and OTC data 3. Can infer a person’s work zip code from their home zip code 4. Can explain the model’s belief in an anthrax attack 41 Weng-Keen Wong, Oregon State University ©2005
  • 42. Acknowledgements • Andrew Moore (for letting me copy material from his slides) • Greg Cooper, John Levander, John Dowling, Denver Dash, Bill Hogan, Mike Wagner, and the rest of the RODS lab 42 Weng-Keen Wong, Oregon State University ©2005
  • 43. References Bayesian networks: • “Bayesian networks without tears” by Eugene Charniak • “Artificial Intelligence: A Modern Approach” by Stuart Russell and Peter Norvig Other references: • My webpage http://www.eecs.oregonstate.edu/~wong • PANDA webpage http://www.cbmi.pitt.edu/panda • RODS webpage http://rods.health.pitt.edu/ 43 Weng-Keen Wong, Oregon State University ©2005