fuzzy expert system

23
Fuzzy Expert System

Upload: patience-benjamin

Post on 03-Jan-2016

130 views

Category:

Documents


9 download

DESCRIPTION

Fuzzy Expert System. Fuzzy Expert System. Fuzzy Sets Fuzzy representation in computer Linguistic variables and hedges Operations of fuzzy sets Fuzzy rules Reasoning with fuzzy rules Fuzzy inference Building fuzzy expert system. Basic Notions. Fuzzy Logic. - PowerPoint PPT Presentation

TRANSCRIPT

Fuzzy Expert System

Fuzzy Expert System

Basic Notions

1. Fuzzy Sets2. Fuzzy representation in

computer3. Linguistic variables and hedges4. Operations of fuzzy sets5. Fuzzy rules6. Reasoning with fuzzy rules7. Fuzzy inference8. Building fuzzy expert system

Fuzzy Logic

Fuzzy Logic

Fuzzy logic is determined as a set of mathematical principles for knowledge representation based on degrees of membership rather than on crisp membership of classical binary logic

Fuzzy Logic

Fuzzy Logic

• Multi-valued• Deals with degree of

membership• Degrees of truth• Uses continuum of logical

val;ues between 0 (completely false) and 1(completely true)

Fuzzy Sets

Fuzzy set

• Refer page 89• The basic idea of fuzzy set

theory ; an element belongs to a fuzzy set with certain degree of membership.

• Not either true or false, but partly true(false) to any degree

• Taken as a real number in the interval

• Refer table 4.1, fig. 4.2.

Fuzzy set theory

• Crisp set– Let X be the universe of discourse and its

elements be denoted as x. crisp set A of X is defined as function fA(x) of A

• fA(x): X 0,1

• Where

Axif

Axifxf A ,0

,1)(

Fuzzy set theory

• Fuzzy set– Fuzzy set A of universe X is defined by function

A(x) called membership function of set A A(x): X [0,1]

• where A(x) = 1 if x is totally in A• A(x) = 0 if x is not in A

0 < A(x) < 1 if x is partly in A

The representation of fuzzy set

• Determine the membership function

• Method to determine membership function– Single expert– Multiple experts– Self generated by ANN, learn the data & derive

the fuzzy sets.

The representation of fuzzy set• Refer ‘tall men’ example (figure 4.3, 4.4)• Fuzzy set of tall men in figure 4.3 can be

represented as fit-vectorTall men = (0/180, 0.5/185, 1/190) or

Tall men = (0/180, 1/190)

• Fuzzy set of short and average menShort men = (1/160, 0.5/165, 0/170) or

Short men = (1/160, 0/170)

average men = (0/165, 1/175, 0/185)

Linguistic variables and hedges• A fuzzy variable

• E.g. the statement “John is tall” implies that the linguistic variable John takes the linguistic value tall

• In fuzzy ES linguistic variables are used in fuzzy rulesIF wind is strong

THEN sailing is good

IF project duration is long

THEN completion_risk is high

IF the speed is slow

THEN stopping_distance is short

Linguistic variables and hedges• E.g. The linguistic variable speed have range between 0

and 220 km/hour may include fuzzy subsets as very slow, slow, medium, fast and very fast

• Hedges - fuzzy set qualifiers

– Carries by a linguistic variable

– Terms that modifies fuzzy sets

– Includes adverb I.e. very, somewhat, quite, more or less and slightly

– Can modify verbs, adjectives, adverbs or thw whole sentence (pg 95)

Linguistic variables and hedges• Hedges act as operations

– Very perform concentration and creates new subset

– E.g. tall men derive the subset very tall men

– Dilation : the of more or less tall men is broader than the set of tall men.

– Refer figure 4.5.

– Refer table 4.2

Fuzzy sets operations

operations

1. Complement2. Containment3. Intersection4. Union5. Commutativity6. Associativity7. Distrubutivity8. Indempotency9. Identity10. Involution11. Transitivity12. De Morgan’s law

Fuzzy rules• Capturing human knowledge in fuzzy rules

• Form of fuzzy rules:

IF x is A

THEN y is B

Where x and y are linguistic variables; A and B are linguistic values determined by fuzzy sets

Fuzzy rules• Difference with classical rules

– Classical IF-THEN rule uses binary logic e.g.

• Rule 1:

IF speed is > 100 THEN the stopping_distance is long

• Rule 2:

IF speed is < 40 THEN stopping_distance is short

– The variable speed can have any numerical value between 0-220km/h

– The linguistic variables stopping_distance can only take either long or short.

Fuzzy rules• Difference with classical rules

– Fuzzy IF-THEN rules uses binary logic e.g.

• Rule 1:

IF speed is fast THEN the stopping_distance is long

• Rule 2:

IF speed is slow THEN stopping_distance is short

– The variable speed can have any numerical value between 0-220km/h but include fuzzy sets range , slow, medium and fast

– The linguistic variables stopping_distance can be between 0 and 300m and may take fuzzy sets as short, medium or long

• Fuzzy expert systems merge the rules and consequently cut the number of rules at least 90%

Reasoning with Fuzzy rules• Includes 2 distinct part

– Evaluating the rule antecedent (the IF part)– Implication or applying the result to the consequent (the THEN

part)

• Mechanism– In classical rule based system

• If the rule antecedent is true, the consequent is also true

– In fuzzy systems, • All rules fires to some extent, • Partially fire• If the antecedent is true to some degree of membership, then the

consequent is also true to that same degree

– Discuss fig. 4.8, 4.9

Reasoning with Fuzzy rules• A fuzzy rule can have

– Multiple parts of antecedent

– Multiple parts of consequent (see example pg 105)

• In general fuzzy expert system incorporates not one but several rules that describe expert knowledge

Reasoning with Fuzzy rules• The output of each rule is a fuzzy set but need to

obtain a single number representing the ES output

• The output of the fuzzy sets are combined and transformed into a single number by..– Aggregates all output fuzzy sets into a single output

fuzzy set

– Then defuzzifies the resulting fuzzy set into a single number

– Fuzzy inference

Fuzzy inference• A process of mapping from a given input to an

output using the fuzzy theory.

– Mamdani-style inference

– Sugeno-style inference

Fuzzy inference• Mamdani-style inference• Involve 4 steps

– Fuzzification of the input variables

– Rule evaluation

– Aggregation of the rule output

– Defuzzification

• Refer example in pg 106-112

Building fuzzy ES• An iterative process that involves defining fuzzy

sets and fuzzy rules, evaluating and the tuning the system to meet the specified requirement.

Building fuzzy ES

5 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 ES

5. Evaluate and tune the system