© C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can...

34
© C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are several sources of uncertainty in rules: Uncertainty related to individual rules Uncertainty due to conflict resolution Uncertainty due to incompatibility of rules

Transcript of © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can...

Page 1: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 11

Uncertainty and Rules

• We have already seen that expert systems can operate within the realm of uncertainty.

• There are several sources of uncertainty in rules:– Uncertainty related to individual rules– Uncertainty due to conflict resolution– Uncertainty due to incompatibility of rules

Page 2: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 22

Figure 5.1 Major Uncertainties in Rule-Based Expert Systems

Page 3: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 33

Figure 5.2 Uncertainty Associated with the Compatibilities of Rules

Page 4: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 44

Knowledge Engineer

• The knowledge engineer endeavors to minimize, or eliminate, uncertainty if possible.

• Minimizing uncertainty is part of the verification of rules.

• Verification is concerned with the correctness of the system’s building blocks – rules.

Page 5: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 55

Verification vs. Validation

• Even if all the rules are correct, it does not necessarily mean that the system will give the correct answer.

• Verification refers to minimizing the local uncertainties.

• Validation refers to minimizing the global uncertainties of the entire expert system.

• Uncertainties are associated with creation of rules and also with assignment of values.

Page 6: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 66

Sources of Uncertainty

• Potential contradiction of rules – the rules may fire with contradictory consequents, possibly as a result of antecedents not being specified properly.

• Subsumption of rules – one rules is subsumed by another if a portion of its antecedent is a subset of another rule.

Page 7: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 7

• Information is partial

• Information is not fully reliable.

• Representation language is inherently imprecise.

• Information comes from multiple sources and it is conflicting.

• Information is approximate

• Non-absolute cause-effect relationships exist

Cont’d…

Page 8: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 8

• In many cases, our knowledge of the world is incomplete (not enough information) or uncertain (sensors are unreliable).

• Often, rules about the domain are incomplete or even incorrect

• We have to act in spite of this!• Drawing conclusions under uncertainty

Page 9: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 99

Uncertainty

• When a fact is entered in the working memory, it receives a unique timetag – indicating when it was entered.

• The order that rules are entered may be a factor in conflict resolution – if the inference engine cannot prioritize rules, arbitrary choices must be made.

• Redundant rules are accidentally entered / occur when a rule is modified by pattern deletion.

Page 10: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 1010

Uncertainty

• Deciding which redundant rule to delete is not a trivial matter.

• Uncertainty arising from missing rules occurs if the human expert forgets or is unaware of a rule.

• Data fusion is another cause of uncertainty – fusing of data from different types of information.

Page 11: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 1111

State of Uncertainty

• There are two mountains – logic and uncertainty• Expert systems are built on the mountain of logic

and must reach valid conclusions given a set of premises – valid conclusions given that –

– The rules were written correctly– The facts upon which the inference engine generates

valid conclusions are true facts

Page 12: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 12

Knowledge & Inexact Reasoning

• inexact knowledge (truth of not clear)• incomplete knowledge (lack of knowledge

about )• defaults, beliefs (assumption about truth of )

• contradictory knowledge ( true and false)• vague knowledge (truth of not 0/1)

Page 13: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 13

Inexact Reasoning

• Inexact Reasoning CF Theory - uncertainty• uncertainty about facts and conclusions Fuzzy - vagueness• truth not 0 or 1 but graded (membership fct.)

Truth Maintenance - beliefs, defaults• assumptions about facts, can be revised

Probability Theory - likelihood of events• statistical model of knowledge

Page 14: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 14

Inexact Reasoning not necessary ...NOT necessary when assuming:

• complete knowledge about the "world"• no contradictory facts or rules• everything is either true or false

This corresponds formally to a complete consistent theory in First-Order Logic, i.e.

• everything you have to model is contained in the theory, i.e. your theory or domain model is complete

• facts are true or false (assuming your rules are true)• your sets of facts and rules contain no contradiction (are

consistent)

Page 15: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 15

Exact Reasoning: Theories in First-Order Predicate Logic

Theory (Knowledge Base) given as a set of well-formed formulae.

Formulae include facts like mother (Mary, Peter)

and rules like mother (x, y) child (y, x)

Reasoning based on applying rules of inference of first-order predicate logic, like Modus Ponens:

If p and pq given then q can be inferred (proven)

p, pqq

Page 16: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 16

Forms of Inexact Knowledge

• uncertainty (truth not clear)– probabilistic models, multi-valued logic (true, false, don't

know,...), certainty factor theory

• incomplete knowledge (lack of knowledge)– P true or false not known ( defaults)

• defaults, beliefs (assumptions about truth)– assume P is true, as long as there is no counter-evidence (i.e.

that ¬P is true)– assume P is true with Certainty Factor

• contradictory knowledge (true and false)– inconsistent fact base; somehow P and ¬P true

• vague knowledge (truth value not 0/1; not crisp sets)– graded truth; fuzzy sets

Page 17: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 17

Inexact Knowledge - Example

Person A walks on Campus towards the bus stop. A few hundred yards away A sees someone and is quite sure that it's his next-door neighbor B who usually goes by car to the University. A screams B's name.

default - A wants to take a bus

belief, (un)certainty - it's the neighbor B

probability, default, uncertainty - the neighbor goes home by car

default - A wants to get a lift

default - A wants to go home

Q: Which forms of inexact knowledge and reasoning are involved here?

Page 18: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 18

Examples of Inexact Knowledge

Person A walks on Campus towards the bus stop. A few hundred yards away A sees someone and is quite sure that it's his next-door neighbor B who usually goes by car to the University. A screams B's name.

Fuzzy - a few hundred yardsdefine a mapping from "#hundreds" to 'few', 'many', ...not uncertain or incomplete but graded, vague

Probabilistic - the neighbor usually goes by carprobability based on measure of how often he takes car; calculates always p(F) = 1 - p(¬F)

Belief - it's his next-door neighbor B "reasoned assumption", assumed to be true

Default - A wants to take a bus assumption based on commonsense knowledge

Page 19: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 19

Dealing with Inexact Knowledge

Methods for representing and handling:1. incomplete knowledge: defaults, beliefs

Truth Maintenance Systems (TMS); non-monotonic reasoning

2. contradictory knowledge: contradictory facts or different conclusions, based on defaults or beliefs TMS, Certainty Factors, ... , multi-valued logics

3. uncertain knowledge: hypotheses, statistics Certainty Factors, Probability Theory

4. vague knowledge: "graded" truth Fuzzy, rough sets

5. inexact knowledge and reasoning involves 1-4; clear 0/1 truth value cannot be assigned

Page 20: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 20

In many cases, our knowledge of the world is incomplete (not enough information) or uncertain (sensors are unreliable).

Often, rules about the domain are incomplete or even incorrect

We have to act in spite of this! Drawing conclusions under uncertainty

Page 21: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 21

Example

Goal: The agent wants to drive someone to air port to catch a flight Let action At = leave for airport t minutes before flightWill 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 either5. risks falsehood: “A25 will get me there on time”, or6. leads to conclusions that are too weak for decision making:

“A25 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.”

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

Page 22: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 22

Making decisions under uncertainty

Suppose I believe the following:

P(A25 gets me there on time | …) = 0.04 P(A90 gets me there on time | …) = 0.70 P(A120 gets me there on time | …) = 0.95 P(A1440 gets me there on time | …) = 0.9999 Which action to choose? Which one is rational?

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

The fundamental idea of decision theory is that an agent is rational if and only if it chooses the action that yields that highest expected utility, averaged over all the possible outcomes of the action.

Page 23: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 23

Uncertainty in logical rules

Page 24: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 24

Imagine an urn containing 1500 red, pink, yellow, blueand white marbles.

Take one ball from the urn. What is:

P(black) =

P(~black) = ~ = NOT

0

1

Probabilities are all greater than or equal to zero and lessthan or equal to one.

Probability

Page 25: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 25

Same urn:Suppose the number of balls is as follows:

Red 400Pink 100Yellow 400Blue 500White 100Total 1500

What is:

P(Red) =

P(Pink) =

P(Yellow) =

P(Blue) =

P(White) =

Total =

400/1500 = .267

100/1500 = .067

400/1500 = .267

500/1500 = .333

100/1500 = .067

1

Page 26: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 26

Joint probabilities and independence

Define A as the event “draw a red or a pink marble.”

We know 500 marbles are either red or pink.

What are: P(A) =

P(~A) =

1500100400

(1 - P(A)) = .67

= .33

Page 27: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 27

Joint probabilities and independence (we’re

getting there)Define B as the event, “draw a pink or white marble.”

We know 200 marbles are pink or white.

What are: P(B) =

P(~B) =

.133

.867

Page 28: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 28

Joint probabilities and independence

Define A as the event “draw a red or a pink marble.”

Define B as the event “draw a pink or white marble.”

What is: P(A, B) = P(A B)

This is the joint probability of A and B.

What color is the marble? Pink

P(A, B) = P(pink) =1500100

= .0667

Page 29: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 29

Conditional probabilities

What is

P(A | B) =

200100

P(~A | ~B) =

1300900

P(A | ~B) =

1300400 P(~B | A) =

500400

The probability that a particularevent will occur, given we alreadyknow that another event hasoccurred.

We have information to bringto bear on the base rate probability of the event

100pink

100white

400red

900all others

A ~A

B

~B

200

1300

500 1000 1500

Page 30: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 30

Page 31: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 31

Page 32: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 32

Page 33: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 33

Page 34: © C. Kemke Inexact Reasoning 1 1 Uncertainty and Rules We have already seen that expert systems can operate within the realm of uncertainty. There are.

© C. Kemke Inexact Reasoning 34