Professional Documents
Culture Documents
Gastro Gastro
Intestinal Pneumonia Intestinal Pneumonia
disorders disorders
Reduced Reduced
Diarrhoea Coughing Diarrhoea Coughing
Weight gain Weight gain
Gastro Gastro
Intestinal Pneumonia Intestinal Pneumonia
disorders disorders
Reduced Reduced
Diarrhoea Coughing Diarrhoea Coughing
Weight gain Weight gain
1
Where is Bayesian networks placed in AHM? Text books/literature
Software Outline
Esthauge LIMID Software System Today (28th of september)
General introduction to Bayesian networks:
www.esthauge.dk
What is a Bayesian network?
You can download the software from the course Exercise 11.1
homepage Transmission of evidence
Exercise 11.2
Graphical model with some restrictions (next slide) Bayesian networks consist of:
Basically a static method (here and now imagine) A set of variables and a set of directed edges between
variables
A static version of data filtering
Each variable has a finite set of mutually exclusive states
2
Each variable has a definte set of mutually excusive states Bayesian networks - definition
disorders
The variables and directed edges form a directed acyclic
0-100g/day No coughing graph
No diarrhea
101-200 g/day Some coughing
Some diarrhoea
>200 g/day A lot of coughing
A lot of diarrhoea
Reduced
Diarrhoea Coughing
Weight gain
The variables and directed edges form a directed acyclic graph The variables and directed edges form a directed acyclic graph
A A
B B
C D C D
F E G F E G
The variables and directed edges form a directed acyclic graph Bayesian networks - definition
F E G
3
Bayes Theorem Now an example!!
Yes
Not observable Pregnant
B B1, B2,.,Bm No
P( Bj | Ai ) P ( Ai )
P( Ai | Bj ) = Yes
P( Bj | A1) p( A1) + P( Bj | A2) P( A2) + ..... + P( Bj | An) P ( An) Observable Heat
No
n
P ( Bj ) = P( Bj | Ak ) P ( Ak )
k =1
4
Bayes Theorem for our net
Bayes Theorem for our net
How do we use Bayes formula to calculate: How do we use Bayes formula to calculate:
P(Pregnant=yes|Heat=yes) P(Pregnant=yes|Heat=no)
P ( Bj | Ai ) P ( Ai )
P ( Ai | Bj ) =
P ( Bj | A1) p ( A1) + P ( Bj | A2) P ( A2) + ..... + P ( Bj | An) P ( An)
Consistent combination of information from various Risk factors Herd SPF Purchase
sources
size status policy
5
Transmission of evidence Transmission of evidence
Breed
Feed Colic Death
Litter
Color
size
If Colic is observed, there will be no connection
between Feed and Death
If Breed is observed, there will be no influence
Feed and Death are d-separated given of Color on Litter size
Colic
Litter size and Color are d-separated given
Evidence may be transmitted through a serial Breed
connection unless, the state of the intermediate
variable is known Evidence may be transmitted through a diverging
connection unless, the state of the intermediate
variable is known
Converging connection
Mastitis Heat
Temp Gastro
Intestinal Pneumonia
If Temp is observed, the information that a cow disorders
is not in heat will influence the belief that the cow
has mastitis
Evidence may only be transmitted through a
converging connection if a connecting variable (or
descendant is observed) Reduced
Diarrhea Coughing
Weight gain
Gastro Gastro
Intestinal Pneumonia Intestinal Pneumonia
disorders disorders
Reduced Reduced
Diarrhea Coughing Diarrhea Coughing
Weight gain Weight gain
6
Exercise: Mastitis detection Compilation of Bayesian networks
Cursory
Compilation:
Previous case Milk yield Mastitis index
Create a moral graph
Add edges between all pairs of nodes having a
common child.
Remove all directions
Triangulate the moral graph
Heat
Mastitis Add edges until all cycles of more than 3
nodes have a chord
Identify the cliques of the triangulated graph and
organize them into a junction tree.