26
Introduction to Rule-Based Systems, Expert Systems, Fuzzy Systems (sections 2.7, 2.8, pp. 118-132; and partially 3.1 and 3.4) N. Kasabov, Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering, MIT Press, 1996

Introduction to Rule-Based Systems, Expert Systems, Fuzzy ... · `Fuzzification- rule evaluation- defuzzification' inference ... •mean of maxima ... Introduction to Rule-Based Systems,

  • Upload
    hangoc

  • View
    240

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Introduction to Rule-Based Systems, Expert Systems, Fuzzy ... · `Fuzzification- rule evaluation- defuzzification' inference ... •mean of maxima ... Introduction to Rule-Based Systems,

Introduction to Rule-Based

Systems, Expert Systems, Fuzzy

Systems

(sections 2.7, 2.8, pp. 118-132; and

partially 3.1 and 3.4)

N. Kasabov, Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering, MIT Press, 1996

Page 2: Introduction to Rule-Based Systems, Expert Systems, Fuzzy ... · `Fuzzification- rule evaluation- defuzzification' inference ... •mean of maxima ... Introduction to Rule-Based Systems,

Sub-topics:

Production rules and production systems

How to program in rules?

Advantages and limitations of the production systems

Expert systems

Fuzzy sets

Fuzzy rules and fuzzy inference

Fuzzy information retrieval and fuzzy databases

Fuzzy expert systems

N. Kasabov, Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering, MIT Press, 1996

Page 3: Introduction to Rule-Based Systems, Expert Systems, Fuzzy ... · `Fuzzification- rule evaluation- defuzzification' inference ... •mean of maxima ... Introduction to Rule-Based Systems,

Production Rules and

Production Systems

A production rule consists of two parts: condition

(antecedent) part and conclusion (action, consequent) part,

i.e: IF (conditions) THEN (actions)

Example

IF Gauge is OK AND [TEMPERATURE] > 120

THEN Cooling system is in the state of overheating

N. Kasabov, Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering, MIT Press, 1996

Page 4: Introduction to Rule-Based Systems, Expert Systems, Fuzzy ... · `Fuzzification- rule evaluation- defuzzification' inference ... •mean of maxima ... Introduction to Rule-Based Systems,

Production Rules and

Production Systems...

This rule consists of 2 propositions given on separate lines

(2 condition elements) and a conclusion. The second

condition element contains a variable. Condition elements in

a rule can be connected by different connectives, the most

used being AND, OR, NOT.

N. Kasabov, Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering, MIT Press, 1996

Page 5: Introduction to Rule-Based Systems, Expert Systems, Fuzzy ... · `Fuzzification- rule evaluation- defuzzification' inference ... •mean of maxima ... Introduction to Rule-Based Systems,

Production Rules and

Production Systems...

A production system consists of:

• Working memory (facts memory)

• Production rules memory

• Inference engine, it cycles through three steps:

– match facts against rules

– select a rule

– execute the rule

N. Kasabov, Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering, MIT Press, 1996

Page 6: Introduction to Rule-Based Systems, Expert Systems, Fuzzy ... · `Fuzzification- rule evaluation- defuzzification' inference ... •mean of maxima ... Introduction to Rule-Based Systems,

Production Rules and

Production Systems...

N. Kasabov, Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering, MIT Press, 1996

Figure

2.25:

A

production

system

cycle

Page 7: Introduction to Rule-Based Systems, Expert Systems, Fuzzy ... · `Fuzzification- rule evaluation- defuzzification' inference ... •mean of maxima ... Introduction to Rule-Based Systems,

How to Program in Production

Rules?

N. Kasabov, Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering, MIT Press, 1996

Figure 2.27:

A program

written in a

production

language for the

family

relationship

problem

Page 8: Introduction to Rule-Based Systems, Expert Systems, Fuzzy ... · `Fuzzification- rule evaluation- defuzzification' inference ... •mean of maxima ... Introduction to Rule-Based Systems,

Advantages and Limitations of

the Production Systems (PS):

PS are universal computational mechanism

PS are universal function approximators

readability

explanation

expressiveness

modularity

N. Kasabov, Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering, MIT Press, 1996

Page 9: Introduction to Rule-Based Systems, Expert Systems, Fuzzy ... · `Fuzzification- rule evaluation- defuzzification' inference ... •mean of maxima ... Introduction to Rule-Based Systems,

Expert Systems

N. Kasabov, Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering, MIT Press, 1996

They are information systems for solving a specific

problem which provides an expertise similar to those of

experts in the problem area.

An ES contains expert knowledge.

Page 10: Introduction to Rule-Based Systems, Expert Systems, Fuzzy ... · `Fuzzification- rule evaluation- defuzzification' inference ... •mean of maxima ... Introduction to Rule-Based Systems,

Expert Systems...

N. Kasabov, Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering, MIT Press, 1996

A typical ES architecture consists of:

• knowledge base module

• working memory module (for the current data)

• inference engine

• forward chaining (inductive, data driven)

• backward chaining (deductive, goal driven)

• user interface (possibly a NLI, menu, windows, etc)

• explanation module

Page 11: Introduction to Rule-Based Systems, Expert Systems, Fuzzy ... · `Fuzzification- rule evaluation- defuzzification' inference ... •mean of maxima ... Introduction to Rule-Based Systems,

Expert Systems...

N. Kasabov, Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering, MIT Press, 1996

Figure 2.29:

An expert system architecture

Page 12: Introduction to Rule-Based Systems, Expert Systems, Fuzzy ... · `Fuzzification- rule evaluation- defuzzification' inference ... •mean of maxima ... Introduction to Rule-Based Systems,

Expert Systems...

`How' and `Why' explanations in ES

N. Kasabov, Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering, MIT Press, 1996

Figure 2.30

HOW and

WHY

explanation

for The Car

Monitoring

Production

System

Page 13: Introduction to Rule-Based Systems, Expert Systems, Fuzzy ... · `Fuzzification- rule evaluation- defuzzification' inference ... •mean of maxima ... Introduction to Rule-Based Systems,

Data Analysis...

N. Kasabov, Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering, MIT Press, 1996

Expert systems design

• identification

• conceptualization

• formalization

• realization

• validation

The knowledge acquisition problem:

• interview experts

• learning from data

• literature

• agents on the Web

Page 14: Introduction to Rule-Based Systems, Expert Systems, Fuzzy ... · `Fuzzification- rule evaluation- defuzzification' inference ... •mean of maxima ... Introduction to Rule-Based Systems,

Fuzzy Sets

N. Kasabov, Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering, MIT Press, 1996

Figure 3.1

Membership

functions

representing

three fuzzy

sets for the

variable

"height".

Page 15: Introduction to Rule-Based Systems, Expert Systems, Fuzzy ... · `Fuzzification- rule evaluation- defuzzification' inference ... •mean of maxima ... Introduction to Rule-Based Systems,

Fuzzy Sets...

N. Kasabov, Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering, MIT Press, 1996

Figure 3.2

Representin

g crisp and

fuzzy sets

as subsets

of a domain

(universe)

U

Page 16: Introduction to Rule-Based Systems, Expert Systems, Fuzzy ... · `Fuzzification- rule evaluation- defuzzification' inference ... •mean of maxima ... Introduction to Rule-Based Systems,

Fuzzy Sets...

N. Kasabov, Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering, MIT Press, 1996

Figure 3.3

Support of a

fuzzy set A

see also fig 3.21 for an example of fuzzy sets definitions

for the The Bank Loan Decision problem.

Page 17: Introduction to Rule-Based Systems, Expert Systems, Fuzzy ... · `Fuzzification- rule evaluation- defuzzification' inference ... •mean of maxima ... Introduction to Rule-Based Systems,
Page 18: Introduction to Rule-Based Systems, Expert Systems, Fuzzy ... · `Fuzzification- rule evaluation- defuzzification' inference ... •mean of maxima ... Introduction to Rule-Based Systems,

Building Fuzzy Expert System

A typical process in developing the fuzzy expert

system incorporates the following steps:

1. Specify the problem and define linguistic

variables.

2. Determine fuzzy sets.

3. Elicit and construct fuzzy rules.

4. Encode the fuzzy sets, fuzzy rules and

procedures to perform fuzzy inference into the

expert system.

5. Evaluate and tune the system.

Page 19: Introduction to Rule-Based Systems, Expert Systems, Fuzzy ... · `Fuzzification- rule evaluation- defuzzification' inference ... •mean of maxima ... Introduction to Rule-Based Systems,

Fuzzy Rules and Fuzzy

Inference

N. Kasabov, Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering, MIT Press, 1996

Rule 1: IF (CScore is high) and (CRatio is good) and

(CCredit is good)

then (Decision is approve)

Rule 2: IF (CScore is low) and (CRatio is bad) or (CCredit

is bad)

then (Decision is disapprove)

Page 20: Introduction to Rule-Based Systems, Expert Systems, Fuzzy ... · `Fuzzification- rule evaluation- defuzzification' inference ... •mean of maxima ... Introduction to Rule-Based Systems,

Fuzzy Rules and Fuzzy

Inference...

N. Kasabov, Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering, MIT Press, 1996

Inputs to a fuzzy system can be:

• fuzzy, e.g. (Score = Moderate), defined by membership

functions

• exact, e.g.: (Score = 190); (Theta = 35), defined by

crisp values.

Outputs from a fuzzy system can be:

• fuzzy, i.e. a whole membership function, or

• exact, i.e. a single value is produced on the output.

Page 21: Introduction to Rule-Based Systems, Expert Systems, Fuzzy ... · `Fuzzification- rule evaluation- defuzzification' inference ... •mean of maxima ... Introduction to Rule-Based Systems,

Fuzzy Rules and Fuzzy

Inference...

N. Kasabov, Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering, MIT Press, 1996

Fuzzy inference methods:

`Fuzzification- rule evaluation- defuzzification' inference

see Figure 3.27 for an illustration of "crisp input data

rules evaluation defuzzification" inference for a

particular crisp input data for the Bank Loan

Decision system.

Page 22: Introduction to Rule-Based Systems, Expert Systems, Fuzzy ... · `Fuzzification- rule evaluation- defuzzification' inference ... •mean of maxima ... Introduction to Rule-Based Systems,

Fuzzy Rules and Fuzzy

Inference...

N. Kasabov, Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering, MIT Press, 1996

Methods for defuzzification:

• center of gravity

• mean of maxima

see Figure 3.26

Methods of defuzzification: the

centre of gravity method (COG),

and the mean of maxima method

(MOM) applied over the same

membership function for a fuzzy

output variable y. They calculate

different crisp output values.

Page 23: Introduction to Rule-Based Systems, Expert Systems, Fuzzy ... · `Fuzzification- rule evaluation- defuzzification' inference ... •mean of maxima ... Introduction to Rule-Based Systems,

Fuzzy Information Retrieval

and Fuzzy Databases

N. Kasabov, Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering, MIT Press, 1996

Fuzzy interfaces to standard databases

(see fig 3.32)

Fuzzy databases (see fig. 3.33)

Fuzzy expert system shells (see fig. 3.36, 3.37)

Page 24: Introduction to Rule-Based Systems, Expert Systems, Fuzzy ... · `Fuzzification- rule evaluation- defuzzification' inference ... •mean of maxima ... Introduction to Rule-Based Systems,

Fuzzy Information Retrieval

and Fuzzy Databases...

N. Kasabov, Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering, MIT Press, 1996

Fuzzy expert systems

Figure 3.35:

A block diagram

of a fuzzy expert

system.

Page 25: Introduction to Rule-Based Systems, Expert Systems, Fuzzy ... · `Fuzzification- rule evaluation- defuzzification' inference ... •mean of maxima ... Introduction to Rule-Based Systems,

Fuzzy Expert Systems

Fuzzy systems are:

• easy to develop and debug

• easy to understand

• easy and cheap to maintain

N. Kasabov, Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering, MIT Press, 1996

Page 26: Introduction to Rule-Based Systems, Expert Systems, Fuzzy ... · `Fuzzification- rule evaluation- defuzzification' inference ... •mean of maxima ... Introduction to Rule-Based Systems,