Docsity

the uncertainty reasoning, Summaries of Introduction to Computing

Partial preview of the text

Download the uncertainty reasoning and more Summaries Introduction to Computing in PDF only on Docsity!

CS 771

Artificial Intelligence

Reasoning under uncertainty

Today…

  • Representing uncertainty is useful in knowledge bases
    • Probability provides a coherent framework for uncertainty
  • Review basic concepts in probability
    • Emphasis on conditional probability and conditional independence
  • Full joint distributions are difficult to work with
    • Conditional independence assumptions allow us to model real-world phenomena with much simpler models
  • Bayesian networks are a systematic way to build compact, structured

distributions

  • Reading: Chapter 13; Chapter 14.1-14.

Acting under uncertainty

Let action At = leave for airport t minutes before flight Will At get me there on time?

Problems:

  1. partial observability (road state, other drivers' plans, etc.)
  2. noisy sensors (traffic reports)
  3. uncertainty in action outcomes (flat tire, etc.)
  4. immense complexity of modeling and predicting traffic

Hence a purely logical approach either

  1. risks falsehood: “ A 25 will get me there on time”, or
  2. leads to conclusions that are too weak for decision making:

“ A 25 will get me there on time if there's no accident on the bridge and it doesn't rain and my tires remain intact etc etc.”

( A 1440 might reasonably be said to get me there on time but I'd have to stay overnight in the airport …)

  • Consider an example of uncertain reasoning : diagnosing a dental patient’s

toothache

  • Let’s try to write rules for dental diagnosis using propositional logic
  • Consider the following simple rule : Toothache  Cavity
  • The rule is wrong
  • Not all patients with toothache have cavities
  • In order to make this rule true we have to add almost an infinite list of possible problems
  • We could try turning the rule into a causal rule

Cavity  Toothache

  • Not all cavities cause pain
  • The connection between toothache and cavities is just not logical consequence

in other direction

  • This is true in medical domain as well as most other judgmental domain :law , business, design, automobile repair, gardening, dating and so on
  • An agent’s knowledge can at best provide only a degree a belief in the relevant

sentences

  • Main tool for doing so is probability theory
  • E.g., there is 80% chance that the patient who has toothache has cavity

Summarizing uncertainty

Toothache  Cavity V GumProblem V Abscess …

Making decisions under uncertainty

Suppose I believe the following:

P(A 25 gets me there on time | …) = 0. P(A 90 gets me there on time | …) = 0. P(A 120 gets me there on time | …) = 0. P(A 1440 gets me there on time | …) = 0.

  • Which action to choose?

Depends on my preferences for missing flight vs. time spent waiting, etc.

  • Utility theory is used to represent and infer preferences
  • Decision theory = probability theory + utility theory

Syntax

  • Basic element: random variable
  • Similar to propositional logic: possible worlds defined by assignment of

values to random variables.

  • Boolean random variables e.g., Cavity (do I have a cavity?)
  • Discrete random variables e.g., Dice is one of < 1,2,3,4,5,6 >
  • Domain values must be exhaustive and mutually exclusive
  • Elementary proposition constructed by assignment of a value to a random

variable:

e.g., Weather = sunny , Cavity = false (abbreviated as  cavity )

  • Complex propositions formed from elementary propositions and standard

logical connectives e.g., Weather = sunny  Cavity = false

Axioms of probability

• Given a set of possible worlds S

– P( A ) ≥ 0 for all atomic events A

– P( S ) = 1

– If A and B are mutually exclusive, then:

P( AB ) = P( A ) + P( B )

• Refer to P( A ) as probability of event A

– e.g. if coins are fair P({H,H}) = ¼

Probability and Logic

• Probability can be viewed as a generalization of

propositional logic

• P( a ):

  • a is any sentence in propositional logic
  • Belief of agent in a is no longer restricted to true, false, unknown
  • P( a ) can range from 0 to 1
    • P( a ) = 0, and P( a ) = 1 are special cases
    • So logic can be viewed as a special case of probability

Conditional Probability

• The 2 dice problem

– Suppose I roll two fair dice and 1st^ dice is a 4

– What is probability that sum of the two dice is 6?

– 6 possible events, given 1st^ dice is 4

  • (4,1),(4,2),(4,3),(4,4),(4,5),(4,6)

– Since all events (originally) had same probability,

these 6 events should have equal probability too

– Probability is thus 1/

Conditional Probability

• Let A denote event that sum of dice is 6

• Let B denote event that 1st^ dice is 4

• Conditional Probability denoted as: P( A | B )

  • Probability of event A given event B

• General formula given by:

  • Probability of AB relative to probability of B

• What is P(sum of dice = 3 | 1st^ dice is 4)?

– Let C denote event that sum of dice is 3

– P(B) is same, but P( C  B ) = 0

Prior (Unconditional) Probability

  • Probability distribution gives values for all possible assignments:
  • Joint probability distribution for a set of random variables gives the probability of every atomic event on those random variables
  • P( A , B ) is shorthand for P( AB )
  • Joint distributions are normalized: Sa Sb P( A =a, B =b) = 1

Sunny Rainy Cloudy Snowy P( Weather ) 0.7 0.1 0.19 0.

P( Weather,Cavity ) Sunny Rainy Cloudy Snowy Cavity 0.144 0.02 0.016 0. ⌐Cavity 0.556 0.08 0.174 0.

Computing Probabilities

• Say we are given following joint distribution:

Joint distribution for k

binary variables has 2 k

probabilities!

Computing Probabilities

• What is P(cavity|toothache)?

• Can get any conditional probability from joint distribution

Computing Probabilities: Normalization

  • What is P(Cavity|Toothache=toothache)?

This is a distribution over the 2 states: {cavity,¬cavity}

Distributions will be denoted w/ capital letters; Probabilities will be denoted w/ lowercase letters.

αP(Cavity,toothache) Cavity = cavity 0.108 + 0.012 = 0. Cavity = ¬cavity 0.016 + 0.064 = 0.

P(Cavity|toothache) Cavity = cavity 0. Cavity = ¬cavity 0.