240 likes | 320 Views
Reasoning - Rule-based and Probabilistic. Representing relations with predicate logic Limitations of predicate logic Representing relations with probabilities. Causal Rules vs. Diagnostic (Evidential) Rules. Cavity(tooth1) → Toothache(tooth1) Model of the world, causal link
E N D
Reasoning -Rule-based and Probabilistic • Representing relations with predicate logic • Limitations of predicate logic • Representing relations with probabilities PR
Causal Rules vs. Diagnostic (Evidential) Rules • Cavity(tooth1) → Toothache(tooth1) • Model of the world, causal link • Toothache(tooth1) ← Cavity(tooth1) • Typical symptom, might be due to typical cause PR
Dental Model – causal relations • Cavity → Toothache • Gum disease → Toothache • Impacted Wisdom Teeth → Toothache • Sinus Infection → Toothache Other causes? PR
Causal Relations Cavity → Toothache Cavity → X-ray shad Gum disease → Toothache Gum disease → Red gums Impacted Wisdom Teeth → Toothache Impacted Wisdom Teeth → X-ray shad Sinus Infection → Toothache Sinus infection → X-ray shad Sinus infection → Headache PR
Rule-based Inferencing – finding confirmatory evidence Cavity ← Toothache Cavity → X-ray shad Gum disease ← Toothache Gum disease ↔ Red gums Impacted Wisdom Teeth ← Toothache Impacted Wisdom Teeth → X-ray shad Sinus Infection ← Toothache Sinus infection → X-ray shad Sinus infection ↔ Headache PR
First Order Logic Fails because • Exhaustive listings are too labor intensive and inflexible • Medical theories are incomplete • Knowledge of the patient’s condition is often incomplete PR
Artificial Intelligence Meets the Real World • Search and Reasoning work well for clearly-defined problems with • Reliable axioms, complete knowledge • Accessible, Static • The Real World isn’t like that • Medical Diagnosis • Refinery Control • Taxi Driving PR
Probabilistic* reasoning works because • Don’t have to predetermine order of inferencing – Bayes “reverses arrows” • Accommodates uncertainty and incomplete knowledge * AKA Bayesian reasoning, bayesian networks, belief networks PR
sinus inf cavity impacted wisdom T. gum disease Red, swollen gums T. X-ray Sh. headache S. X-ray Sh. What are Belief Nets Used for? • Dental diagnosis example – which disease is causing a toothache? toothache PR
Probabilistic Reasoning • Probabilities • Joint distributions • Conditional distributions • Chain Rule • Conditional Independence • Belief networks • Conditional Probability Tables • Independence Relations • Inference PR
Probability Theory • P(A) prior, unconditional probability • P(cavity) = 0.05 • P(A|B) conditional probability The probability of A given that all we know is B • P(cavity|toothache) = .8 PR
Axioms of Probability • All probabilities are between 0 and 1 • P(True) = 1, P(False) = 0 • P(A \/ B) = P(A) + P(B) – P(A /\ B) derive P( ¬ A) = 1 - P(A) PR
Random Variables • A term whose value isn’t necessarily known • Discrete r.v – values from a finite set • Boolean r.v. – values from {true,false} • Continuous r.v. – values from subset of real line PR
Random Variables (2) • Discrete s2_st “state of switch 2” {ok, upside-down, short, broken, intermittent} • Boolean 11_lt “light 11 is lit” {true,false} • Continuous current(w1) “current through wire 1” real value PR
Probabilistic Causal Rules .40 Cavity → Toothache .05 Gum disease → Toothache .10 Impacted Wisdom Teeth → Toothache .45 Sinus Infection → Toothache Empirical evidence, (approximate reality?) Subjective (based on beliefs) PR
Joint Probability Distributions P(cavity) = .04 + .01 = .05 P(cavity toothache) = .04 + .01 + .06 = .11 PR
Probability Distributions Joint distribution is written: P(X1, X2, X3, …, XN) N-dimensional table with 2N entries P(X1=a, X2 =b, X3 =c, …, XN =q) is one entry of table Shorthand: P(a, b, c, …, q) PR
Finding a marginal probability P(cavity, toothache) = .04 P(cavity, ¬toothache) = .01 P(cavity) = .05 PR
Conditional Probability • P(h) prior, unconditional probability P(Cavity= true) = P(cavity) = 0.05 P(Cavity= false) = P(¬ cavity) = 0.95 • P(h|e) conditional probability The probability of h given that all we know is e P(toothache|cavity) = .8 PR
Conditional Probability P(h|e) = P(h, e) P(e) P(cavity) = .05 P(cavity, toothache) = .04 P(toothache|cavity) = .04 = .80 .05 Think of each variable assignment as a possible world. Of all of the possible worlds in which “cavity” is true, in 4 out of 5 “toothache” is also true. PR
Conditional Probability Distributions P(toothache|cavity) = P(toothache, cavity) P(cavity) PR
Decomposing Conjunctions via Conditional Probabilities - Chain Rule • P(f1, f2, …, fn) = P(f1) * • P(f2 | f1) * • P(f3 | f1, f2 ) * • . . . • . . . • P(fn | f1 , f2 , ... , fn-1) PR
Bayes’ Theorem • Bayes’ Theorem relates conditional probability • distributions: • P(h | e) = P(e | h) * P(h) • P(e) • or with additional conditioning information: • P(h | e, k) = P(e | h, k) * P(h | k) • P(e | k) PR
Proof of Bayes P(h, e) = P(h | e) * P(e) (chain rule) = P(e | h) * P(h) (chain rule) P(h | e) = P(h, e) = P(e | h) P(h) P(e) P(e) P(h, e | k) = P(h | e, k) * P(e | k) (chain rule) P(h | e, k) = P(e | k,h) P(h | k) P(e | k) PR