Intelligente Systeme
WS 18/19
- Dr. Benjamin Guthier
Professur für Bildverarbeitung
Intelligente Systeme – Dr. Benjamin Guthier
Intelligente Systeme WS 18/19 Dr. Benjamin Guthier Professur fr - - PowerPoint PPT Presentation
Intelligente Systeme WS 18/19 Dr. Benjamin Guthier Professur fr Bildverarbeitung Intelligente Systeme Dr. Benjamin Guthier 2. PROBABILISTIC MODELS Intelligente Systeme Dr. Benjamin Guthier Need for Probabilistic Reasoning Human
Intelligente Systeme – Dr. Benjamin Guthier
Intelligente Systeme – Dr. Benjamin Guthier
| 2. Probabilistic Models
– Does not account for uncertainty – Cannot handle conflicting evidence
Intelligente Systeme – Dr. Benjamin Guthier 3
| 2. Probabilistic Models
– S. Russel and P. Norvig, Artificial Intelligence: A Modern
Intelligente Systeme – Dr. Benjamin Guthier 4
| 2. Probabilistic Models
– one of <sunny, rainy, cloudy, snow> – Values must be exhaustive and mutually exclusive
– Weather = sunny – Cavity = false – Complex propositions: Weather = sunny ∨ Cavity = false
Intelligente Systeme – Dr. Benjamin Guthier 5
| 2. Probabilistic Models
– Cavity = true ∧ Toothache = false (short: cavity ∧ ¬toothache) – Cavity = false ∧ Toothache = false – Cavity = true ∧ Toothache = true – Cavity = false ∧ Toothache = true
Intelligente Systeme – Dr. Benjamin Guthier 6
| 2. Probabilistic Models
– 𝑄(Cavity = true) = 0.2 – 𝑄(Weather = sunny) = 0.72
– 𝑸 Weather = < 0.72, 0.1, 0.08, 0.1 > (for sunny, rainy, cloudy, snow) – Must sum to 1
combinations of events
– 𝑸(Weather, Cavity) is a 2 × 4 matrix of values:
Intelligente Systeme – Dr. Benjamin Guthier 7
Weather= sunny rainy cloudy snow Cavity=true 0.144 0.02 0.016 0.02 Cavity=false 0.576 0.08 0.064 0.08
| 2. Probabilistic Models
– List of probabilities: 𝑸 Weather = < 0.72, 0.1, 0.08, 0.1 > – List of variables: 𝒀 =< 𝑌1, 𝑌2, … , 𝑌𝑜 > – Corresponding list of values: 𝒚 =< true, sunny, … , cavity > – List of equations: 𝑸 𝑌, 𝑍 = 𝑸 𝑌 𝑸(𝑍) (one for each combination of values of 𝑌 and 𝑍)
Intelligente Systeme – Dr. Benjamin Guthier 8
| 2. Probabilistic Models
– Probability after more information becomes available – Or: “Probability conditioned on a prior event”
– Probably of having a cavity, given that one has a toothache – In this case, higher than prior probability 𝑄(Cavity = true) = 0.2
– Chance of rain, given a cloudy sky and high pressure – Prob. of someone voting for a party, given age, gender, location
Intelligente Systeme – Dr. Benjamin Guthier 9
| 2. Probabilistic Models
𝑄 𝐵∧𝐶 𝑄(𝐶)
𝑄 𝐵 ∧ 𝐶 = 𝑄 𝐵 𝐶 𝑄(𝐶)
Intelligente Systeme – Dr. Benjamin Guthier 10
| 2. Probabilistic Models
Intelligente Systeme – Dr. Benjamin Guthier 11
| 2. Probabilistic Models
Intelligente Systeme – Dr. Benjamin Guthier 12
| 2. Probabilistic Models
– 𝑸 𝐷 =< 0.999, 0.0008, 0.0002 >
– 𝑸 𝐸 =<
1 6 , 1 6 , 1 6 , 1 6 , 1 6 , 1 6 >
Intelligente Systeme – Dr. Benjamin Guthier 13
| 2. Probabilistic Models
𝑗
– 𝑦𝑗 are the values the variable can take on
– 𝐹 𝐷 = 3 ∗ 0.999 + 4 ∗ 0.0008 + 5 ∗ 0.0002 ≈ 3
– 𝐹 𝐸 = σ𝑗 𝑦𝑗 ∗
1 6 = 1 6 1 + 2 + 3 + 4 + 5 + 6 = 3.5
Intelligente Systeme – Dr. Benjamin Guthier 14
| 2. Probabilistic Models
– E.g., temperature in a room 𝑌 ∈ [18, 26] can be any value in interval
– E.g., probability of temperature being between 18 and 26 is 1.0 – For any 4 degree interval, probability is 0.5 – Probability that the temperature is exactly 21.384 degrees is 0
Intelligente Systeme – Dr. Benjamin Guthier 15
| 2. Probabilistic Models
distribution function (pdf) 𝑄(𝑦)
– E.g., 𝑄 𝑦 = ൝
1 8
if 18 ≤ 𝑦 ≤ 26
𝐺
𝑌 𝑏 ≤ 𝑌 ≤ 𝑐 = න 𝑏 𝑐
𝑄 𝑦 𝑒𝑦
Intelligente Systeme – Dr. Benjamin Guthier 16
1 8 18 26 22 20 24 න
24 26 1
8 𝑒𝑦 = 1 4
| 2. Probabilistic Models
– Example: Height of adult male. 177cm is average. 169cm and 185cm are still fairly common. 200cm is very rare.
1 𝜏 2𝜌 𝑓− 𝑦−𝜈 2
2𝜏2
𝜈 is the mean 𝜏 is the standard deviation (from the mean)
Intelligente Systeme – Dr. Benjamin Guthier 17
𝜈 = 177 𝜏 = 8
| 2. Probabilistic Models
Intelligente Systeme – Dr. Benjamin Guthier 18
| 2. Probabilistic Models
– Toothache: My tooth is hurting – Catch: The dentist’s hook catches on to something (possibly a cavity) – Cavity: My tooth has a cavity
Intelligente Systeme – Dr. Benjamin Guthier 19
𝑢𝑝𝑝𝑢ℎ𝑏𝑑ℎ𝑓 ¬𝑢𝑝𝑝𝑢ℎ𝑏𝑑ℎ𝑓 𝑑𝑏𝑢𝑑ℎ ¬𝑑𝑏𝑢𝑑ℎ 𝑑𝑏𝑢𝑑ℎ ¬𝑑𝑏𝑢𝑑ℎ 𝑑𝑏𝑤𝑗𝑢𝑧 .108 .012 .072 .008 ¬𝑑𝑏𝑤𝑗𝑢𝑧 .016 .064 .144 .576
| 2. Probabilistic Models
– 𝑄 cavity = 0.108 + 0.012 + 0.072 + 0.008 = 0.2
– 𝑄 toothache = 0.108 + 0.012 + 0.016 + 0.064 = 0.2
Intelligente Systeme – Dr. Benjamin Guthier 20
𝑢𝑝𝑝𝑢ℎ𝑏𝑑ℎ𝑓 ¬𝑢𝑝𝑝𝑢ℎ𝑏𝑑ℎ𝑓 𝑑𝑏𝑢𝑑ℎ ¬𝑑𝑏𝑢𝑑ℎ 𝑑𝑏𝑢𝑑ℎ ¬𝑑𝑏𝑢𝑑ℎ 𝑑𝑏𝑤𝑗𝑢𝑧 .108 .012 .072 .008 ¬𝑑𝑏𝑤𝑗𝑢𝑧 .016 .064 .144 .576
| 2. Probabilistic Models
– 𝑄 cavity|toothache =
𝑄 cavity ∧ toothache 𝑄(toothache)
=
0.108+0.012 0.2
= 0.6
– 𝑄 cavity|toothache, catch =
𝑄 cavity,toothache,catch 𝑄(toothache,catch)
=
0.108 0.108+0.016 = 0.87
Intelligente Systeme – Dr. Benjamin Guthier 21
𝑢𝑝𝑝𝑢ℎ𝑏𝑑ℎ𝑓 ¬𝑢𝑝𝑝𝑢ℎ𝑏𝑑ℎ𝑓 𝑑𝑏𝑢𝑑ℎ ¬𝑑𝑏𝑢𝑑ℎ 𝑑𝑏𝑢𝑑ℎ ¬𝑑𝑏𝑢𝑑ℎ 𝑑𝑏𝑤𝑗𝑢𝑧 .108 .012 .072 .008 ¬𝑑𝑏𝑤𝑗𝑢𝑧 .016 .064 .144 .576
| 2. Probabilistic Models
– E.g., hundreds of variables in dentistry
– Large storage space required – Summation over O(𝑤𝑜) values – Difficulty to determine all 𝑤𝑜 probabilities in practice
Intelligente Systeme – Dr. Benjamin Guthier 22
| 2. Probabilistic Models
– For 𝑜 independent random variables: 𝑃(𝑤 ∗ 𝑜) instead of 𝑃 𝑤𝑜
Intelligente Systeme – Dr. Benjamin Guthier 23
| 2. Probabilistic Models
– Toothache depends on the state of the nerves – Catch depends on the skill of the dentist
𝑸 𝑈𝑝𝑝𝑢ℎ𝑏𝑑ℎ𝑓, 𝐷𝑏𝑢𝑑ℎ 𝐷𝑏𝑤𝑗𝑢𝑧 = 𝑸 𝑈𝑝𝑝𝑢ℎ𝑏𝑑ℎ𝑓 𝐷𝑏𝑤𝑗𝑢𝑧 𝑸 𝐷𝑏𝑢𝑑ℎ 𝐷𝑏𝑤𝑗𝑢𝑧
Intelligente Systeme – Dr. Benjamin Guthier 24
| 2. Probabilistic Models
𝑄 𝑏 ∧ 𝑐 = 𝑄 𝑏 𝑐 𝑄(𝑐) and 𝑄 𝑏 ∧ 𝑐 = 𝑄 𝑐 𝑏 𝑄(𝑏)
𝑄 𝑐 𝑏 = 𝑄 𝑏 𝑐 𝑄(𝑐) 𝑄(𝑏)
𝑄 cause effect = 𝑄 effect cause 𝑄(cause) 𝑄(effect) – Typically the prob. of an effect, given a cause is more easily available – Finding the most likely cause when observing effects is the goal
Intelligente Systeme – Dr. Benjamin Guthier 25
| 2. Probabilistic Models
Patient with a stiff neck (𝑡) goes to the doctor. Doctor knows that in 70% of the cases of meningitis (𝑛), patients have a stiff neck. What is the probability of the patient having meningitis?
– 𝑄 𝑛 = 1/50000 (meningitis is very rare) – 𝑄 𝑡 = 0.01 (a stiff neck is comparably common) – 𝑄 𝑡 𝑛 = 0.7 (stiff neck during meningitis is very common)
𝑄 𝑛 𝑡 = 𝑄 𝑡 𝑛 𝑄(𝑛) 𝑄(𝑡) = 0.7 ∗ 1/50000 0.01 = 0.0014 ≈ 1/700 It’s probably just a stiff neck
Intelligente Systeme – Dr. Benjamin Guthier 26
| 2. Probabilistic Models
being round and having a smooth surface.
– Classes 𝐷 = {apple, orange, banana} – Boolean random variables 𝑌1, 𝑌2, 𝑌3 for red-, round-, smooth-ness
– We find 400 apples, 300 oranges and 300 bananas – Out of these, count how many are red, round and smooth
Intelligente Systeme – Dr. Benjamin Guthier 27
Apples Oranges Bananas Red 60% 20% 0% Round 90% 90% 10% Smooth 80% 30% 70%
| 2. Probabilistic Models
– 𝑸 𝐷 =< 0.4, 0.3, 0.3 > (a priori probability of being an apple, orange, banana) – 𝑸(𝑦𝑗|𝐷) (all probabilities of having a feature given its class)
– Given values for its features, what are the probabilities of it being an apple,
𝑸 𝐷 𝑦1, 𝑦2, 𝑦3 =1 𝑸 𝑦1, 𝑦2, 𝑦3 𝐷 𝑸(𝐷) 𝑄(𝑦1, 𝑦2, 𝑦3) = 𝛽𝑸 𝐷 𝑸 𝑦1, 𝑦2, 𝑦3 𝐷 =2 𝛽𝑸 𝐷 ෑ
𝑗=1 𝑜
𝑸(𝑦𝑗|𝐷)
Intelligente Systeme – Dr. Benjamin Guthier 28
| 2. Probabilistic Models
𝑄 apple ¬red, round, smooth = 𝛽𝑄 apple 𝑄 ¬red apple 𝑄 round apple 𝑄 smooth apple = 𝛽 ∗ 0.4 ∗ 0.4 ∗ 0.9 ∗ 0.8 = 𝛽 ∗ 0.1152 𝑄 orange … = 𝛽 ∗ 0.3 ∗ 0.8 ∗ 0.9 ∗ 0.3 = 𝛽 ∗ 0.0648 𝑄 banana … = 𝛽 ∗ 0.3 ∗ 1.0 ∗ 0.1 ∗ 0.7 = 𝛽 ∗ 0.021
Intelligente Systeme – Dr. Benjamin Guthier 29
Apples (40%) Oranges (30%) Bananas (30%) Red 60% 20% 0% Round 90% 90% 10% Smooth 80% 30% 70%