Download presentation
Presentation is loading. Please wait.
Published byEgbert Davidson Modified over 6 years ago
1
Tutorial 2 Simple examples of Bayesian networks, Queries, And the stories behind them Tal Shor
2
Fatigue as a product of smoking
H 0.2 h1 Values β1 β Has a history of smoking π1 β Has Bronchitis π1 - Has lung cancer π1 β Is fatigue π1 β Positive X-ray B=1 H 0.25 h1 0.05 h2 B L L=1 H 0.003 h1 h2 F=1 L B 0.75 l1 b1 0.10 l2 0.5 b2 0.05 C=1 L 0.6 l1 0.02 l2 F C
3
BN Attributes πΌ π· π΅, β
, πΆ - we can clearly see from the graph that bronchitis has no influence on X-ray, and it is only natural πΌ π· (π», π΅,πΏ , πΉ) β given that an individual has both bronchitis and lung cancer β his/her smoking history is no longer relevant when estimating the individualβs fatigue. πΌ π· (π», πΏ, πΆ) β if we know an individual does not have lung cancer, it does not matter how much he smoked, we wonβt find anything in the X-ray scans.
4
BN Attributes (2) Those independencies create a probabilistic function that is easier to compute and much more compact than π·ππ π» Γπ·ππ π΅ Γπ·ππ πΏ ΓDom πΉ Γπ·ππ(πΆ) variables. Without the independencies, those 5 variables would require a table with entries. With them - π π», π΅, πΏ. πΉ, πΆ =π π» Γπ π΅ π» Γπ πΏ π΅ Γπ πΉ π΅,πΏ Γπ(πΆ|πΏ) and there are only 11 entries ( ) For example : π π»=β1, π΅=π2 , πΏ=π1. πΉ,=π1, πΆ=π2 =0.2Γ0.75Γ0.003Γ0.5Γ0.4
5
Simple Example of Bayesian Network
(*) π(π₯,π¦,π§) = π(π₯) π(π¦) π(π§|π₯,π¦) In this BN, X and Y are independent. Follows from definition of BN by summing over values of Z in Eq. (*) yielding π(π₯, π¦) = π(π₯) π(π¦) . X Y Z
6
Specifying Conditional Probability Tables
BB AA OB OA OO π π 1 β¦
7
Specifying Conditional Probability Tables
Pr π=π΄π΄ = Pr π=π΅π΅ = Pr π=ππ = 1 9 Pr π=ππ΄ = Pr π= ππ΅ = Pr π= π΄π΅ = (twice the chance) Pr π =Prβ‘(π) Can you see where this is going?
8
Conditional Dependencies
Prβ‘(X=OA, Y=OA | Z=OO)= Pr Z=ππ X=ππ΄, Y=ππ΄)β
Prβ‘(X=ππ΄, Y=ππ΄) Pr Z=ππ = 1 4 β
= 2 18 Pr X=ππ΄ Z=OO)= Pr Z=ππ X=ππ΄)β
Prβ‘(X=ππ΄) Pr Z=ππ = π¦ Pr Z=ππ X=ππ΄, Y=y)β
Pr π=π¦ = = 4 18 βPrβ‘(X=OO, Y=AA | Z=OO)β Pr X=ππ Z=OO)Γ Pr Y=π΄π΄ Z=OO) X Y Z
9
Probability function The probability function of π,π,π,π,π in this graph is π π,π,π,π,π =π π βπ π βπ π βπ π π,π βπ(π|π,π) And we can see that the probability function of the subset π,π,π,π is the same in the corresponding sub graph π π,π,π,π = π π π,π,π,π,π = π π π βπ π βπ π βπ π π,π βπ(π|π,π) = π π βπ π βπ π π,π β π π π π,π βπ π =π π βπ π βπ π π,π βπ(π|π) X Y Z V W
10
Dependencies πΌ π· π,β
,π , πΌ πΊ π,β
,π , πΌ πΊ π,β
,π Β¬ πΌ π· (π,π,π)
πΌ π· π,β
,π , πΌ πΊ π,β
,π , πΌ πΊ π,β
,π Β¬ πΌ π· (π,π,π) πΌ π· (π,π,π) (NaΓ―ve Bayes) πΌ π· (π,β
,π) Β¬ πΌ π· (π,π,π) (the only path is blocked) X Y Z V W
11
The story behind the BN G would represent the Genotype. It is the DNA code of an attribute that is inherited. P would represent the Phenotype. It is the attribute itself, caused by the genotype Blood type genotype can be one of 9 options {OO, OA, OB, AO, AA, AB, BO, BA, BB} The phenotype can be one of 4 options {O, A, B, AB} πΊβ ππ΄, π΄π, π΄π΄ βπ=π΄ πΊβ ππ΅, π΅π, π΅π΅ βπ=π΅ πΊβ π΄π΅, π΅π΄ βπ=π΄π΅ πΊ=ππβπ=π
12
Royal Blood The picture depicts the royal familyβs pedigree
Each of the parents passes one of his {A, B, O} to his/her child at random (50-50). So each individual, in the end, has 2 of {A, B, O}
13
Royal Blood πΊ πΈπππ§ππππ‘β πΌπΌ πΊ πβππππ π πβππππ π πΈπππ§ππππ‘β πΌπΌ The blood type Bayesian network where G denotes the genotype and P the phenotype. Each parent-child nodes pair have a directed edge between them. It represents the child genotype dependency of his parents The phenotype of an individual is only dependent on his/her genotype. πΊ π·πππππ πΊ πΆβπππππ πΊ π΄πππ πΊ ππππ π π·πππππ π πΆβπππππ πΊ πππππππ
14
Royal Blood πΊ πΈπππ§ππππ‘β βπ΄ πΊ πΊπππππ ππΌ βπ΅ From the simple example, and the fact that Elizabeth II has an O type blood, we can learn that the chance that both Elizabeth and George are AO is 1 18 If Elizabeth IIβs genotype wasnβt known, but one of her descendantβs genotype was, A and B would still be dependent given that condition. Less so, but still. πΊ πΈπππ§ππππ‘β πΌπΌ βπΆ πΊ πΆβπππππ βπ·
15
Royal Blood πΊ π½πππ πππ¦ππππ πΊ π»ππππ¦ ππΌπΌπΌ πΊ π΄πππ π΅ππππ¦π π π΄,π΅,πΆ,π·,πΈ =
π π΄ βπ π΅ βπ πΆ βπ π· π΄,π΅ βπ(πΈ|π΅.πΆ) If Elizabeth I genotype is known, Edwards VIβs and Janeβs genotype are not independent anymore. It blocks the only active path between them. For Example, If Elizabeth I genotype was AB, So if Janeβs genotype was BB then Henryβs most likely would be AA giving an A to Edward. πΊ πΈπππ§ππππ‘β πΌ πΊ πΈππ€πππ ππΌ
16
Royal Blood πΊ π΄π’ππ’π π‘π βπ΄ πΊ πΈππππ π‘ πΌ βπ΅ πΊ πΈππ€πππ βπΆ πΊ π΄πππππ‘ βπ·
π π΄,π΅,πΆ,π·,πΈ,πΉ = π π΄ π π΅ π΄ π πΆ π΄ π π· π΅ π πΈ πΆ π πΉ π·,πΈ Β¬ πΌ π· (πΉ,πΊ, π΄) β exists an active path πΌ π· (πΉ, π·,πΈ ,π΄) β removing parents from paths πΌ π· (πΉ, π΅,πΆ ,π΄) β simply removing all active paths so itβs also d-seperated πΊ π΄πππππ‘ βπ· πΊ ππππ‘ππππ βπΈ πΊ πΈππ€πππ ππΌπΌ βπΉ
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.