Top Banner
Knowledge Engineering
18

Knowledge Engineering. Process of acquiring knowledge from experts and building knowledge base Narrow perspective Knowledge acquisition, representation,

Dec 17, 2015

Download

Documents

Joan Daniels
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Knowledge Engineering.  Process of acquiring knowledge from experts and building knowledge base  Narrow perspective  Knowledge acquisition, representation,

Knowledge Engineering

Page 2: Knowledge Engineering.  Process of acquiring knowledge from experts and building knowledge base  Narrow perspective  Knowledge acquisition, representation,

Knowledge Engineering Process of acquiring knowledge from experts and

building knowledge base Narrow perspective

Knowledge acquisition, representation, validation, inference, maintenance

Broad perspective Process of developing and maintaining intelligent

system

Page 3: Knowledge Engineering.  Process of acquiring knowledge from experts and building knowledge base  Narrow perspective  Knowledge acquisition, representation,

KE Process Knowledge representation

Organized knowledge

Acquisition of knowledge General knowledge or metaknowledge

From experts, books, documents, sensors, files

Inferences Software designed to pass statistical sample data to generalizations

Knowledge validation and verification

Explanation and justification capabilities

Page 4: Knowledge Engineering.  Process of acquiring knowledge from experts and building knowledge base  Narrow perspective  Knowledge acquisition, representation,

•In rule-based expert system, the domain knowledge is represented by a set of IF-THEN production rules and data is represented by a set of facts about the current situation.

•The inference engine compares each rule stored in the knowledge base with facts contained in the database.

Inference Process (1 of 4)Inference Process (1 of 4)

Page 5: Knowledge Engineering.  Process of acquiring knowledge from experts and building knowledge base  Narrow perspective  Knowledge acquisition, representation,

Inference Process (2 of 4)

Done in three stages:

match select execute Match : contents of the working memory are compared to the

facts and rules contained in the knowledge base

Select: When consistent match found the corresponding rules are

placed in the conflict set.

Execute: When all matched rules are placed in the conflict set one

of the rules is selected for execution

Page 6: Knowledge Engineering.  Process of acquiring knowledge from experts and building knowledge base  Narrow perspective  Knowledge acquisition, representation,

Fact: A is XFact: A is X Fact: B is yFact: B is y

Rule: IF A is x THEN B is yRule: IF A is x THEN B is y

Knowledge baseKnowledge base

DatabaseDatabase

MatchMatch FireFire

Figure : The inference engine cycles via a match-fire procedure Figure : The inference engine cycles via a match-fire procedure

Inference Process (3 of 4)Inference Process (3 of 4)

Page 7: Knowledge Engineering.  Process of acquiring knowledge from experts and building knowledge base  Narrow perspective  Knowledge acquisition, representation,

The matching of the IF parts to the facts produces

inference chains.

The inference engine must decide when the rules

have to be fired. There are two principal ways in which

rules are executed:

Forward Chaining

Backward Chaining

Inference Process (4 of 4)Inference Process (4 of 4)

Page 8: Knowledge Engineering.  Process of acquiring knowledge from experts and building knowledge base  Narrow perspective  Knowledge acquisition, representation,

It’s the data-driven reasoning.

The reasoning starts from the known data and proceeds

forward with that data.

Each time only the topmost rule is executed.

When fired, the rule adds a new fact in the database.

Any rule can be executed only once.

The match-fire cycle stops when no further rules can be

fired.

Inference Process: Forward Inference Process: Forward ChainingChaining

Page 9: Knowledge Engineering.  Process of acquiring knowledge from experts and building knowledge base  Narrow perspective  Knowledge acquisition, representation,

Let’s see an example

Inference Process: Forward Inference Process: Forward ChainingChaining

Page 10: Knowledge Engineering.  Process of acquiring knowledge from experts and building knowledge base  Narrow perspective  Knowledge acquisition, representation,

Knowledge-Base

Database

Y & D Z

X & B & E Y

A X

C L

L & M N

Match Fire

A B C D E

X

Knowledge-Base

Database

Y & D Z

X & B & E Y

A X

C L

L & M N

Match Fire

A B C D E

LX

Cycle #1

Inference Process: Forward Inference Process: Forward ChainingChaining

Page 11: Knowledge Engineering.  Process of acquiring knowledge from experts and building knowledge base  Narrow perspective  Knowledge acquisition, representation,

Knowledge-Base

Database

Y & D Z

X & B & E Y

A X

C L

L & M N

Match Fire

A B C D E

YL

Cycle #2

X

Knowledge-Base

Y & D Z

X & B & E Y

A X

C L

L & M N

Match Fire

Database

A B C D E

ZYLX

Cycle #3

Inference Process: Forward Inference Process: Forward ChainingChaining

Page 12: Knowledge Engineering.  Process of acquiring knowledge from experts and building knowledge base  Narrow perspective  Knowledge acquisition, representation,

It’s the goal-driven reasoning.

Here an expert system has the goal and the inference

engine attempts to find the evidence to prove it.

First the knowledge base is searched to find rules that

might have the desired solution.

Such rules must have the goal in their THEN parts. If

such rule is found and its IF part matches data in the

database, then the rule is fired and the goal is proved.

Inference Process: Backward Inference Process: Backward ChainingChaining

Page 13: Knowledge Engineering.  Process of acquiring knowledge from experts and building knowledge base  Narrow perspective  Knowledge acquisition, representation,

Knowledge-Base

Database

Y & D Z

X & B & E Y

A X

C L

L & M N

A B C D E

Pass 1: Goal: Z Pass 2: Sub-goal: y

Z

Knowledge-Base

Y & D Z

X & B & E Y

A X

C L

L & M N

Y

Database

A B C D E

?

Inference Process: Backward Inference Process: Backward ChainingChaining

Page 14: Knowledge Engineering.  Process of acquiring knowledge from experts and building knowledge base  Narrow perspective  Knowledge acquisition, representation,

Pass 3: Sub goal:X

Knowledge-Base

Database

Y & D Z

X & B & E Y

A X

C L

L & M N

A B C D E

X

?

Knowledge-Base

Database

Y & D Z

X & B & E Y

A X

C L

L & M N

A B C D E

Pass 4: Sub goal:X

Match Fire

X

Inference Process: Backward Inference Process: Backward ChainingChaining

Page 15: Knowledge Engineering.  Process of acquiring knowledge from experts and building knowledge base  Narrow perspective  Knowledge acquisition, representation,

Pass 5: Sub-goal: Y

Knowledge-Base

Database

Y & D Z

X & B & E Y

A X

C L

L & M N

A B C D E

Pass 6:Goal: Z

Match Fire

YX

Knowledge-Base

Database

Y & D Z

X & B & E Y

A X

C L

L & M N

A B C D E

Match Fire

ZYX

Inference Process: Backward Inference Process: Backward ChainingChaining

Page 16: Knowledge Engineering.  Process of acquiring knowledge from experts and building knowledge base  Narrow perspective  Knowledge acquisition, representation,

Knowledge-Base

Database

Y & D Z

X & B & E Y

A X

C L

L & M N

Match Fire

A B C D E

LX

Inference Process: Backward Inference Process: Backward ChainingChaining

Y Z

Pass 7:Goal: L

Page 17: Knowledge Engineering.  Process of acquiring knowledge from experts and building knowledge base  Narrow perspective  Knowledge acquisition, representation,

Forward vs. Backward Chaining

Forward Chaining Backward Chainingplanning, control diagnosisdata-driven goal-driven (hypothesis)bottom-up reasoning top-down reasoning

find possible conclusions supported by given facts

find facts that support a given hypothesis

similar to breadth-first search similar to depth-first search

antecedents (LHS) control evaluation

consequents (RHS) control evaluation

Page 18: Knowledge Engineering.  Process of acquiring knowledge from experts and building knowledge base  Narrow perspective  Knowledge acquisition, representation,

THANK YOU