• Aucun résultat trouvé

APPROXIMATE REASONING

Dans le document FUZZY EXPERT SYSTEMS AND FUZZY REASONING (Page 82-89)

4 Fuzzy Logic, Fuzzy Sets, and Fuzzy Numbers: II

4.3 APPROXIMATE REASONING

Approximate reasoningis the term usually used to refer to fuzzy logical inference employing the generalized fuzzy modus ponens, a fuzzy version of the classical modus ponens discussed in Section 3.1. (Here, we are using “approximate reason-ing” in a strict technical sense; the term is also used sometimes in a less technical sense, to mean reasoning under conditions of uncertainty.)

The classical modus ponens is

if A then B (4:28)

which can be readifproposition A is true,theninfer that proposition B is true. The modus ponens itself is a proposition, sometimes written as “A implies B” or

“A!B”, where “implies” is a logical operator with A and B as operands whose truth table given in Chapter 3, Table 3.2. The modus ponens is an important tool in classical logic for inferring one proposition from another, and has been used for that purpose for roughly 2000 years.

The fuzzy version of the modus ponens, thegeneralized modus ponens, has been formulated as:

If X is A then Y is B from X¼A0

infer that Y¼B0

(4:29)

in which A and A0are fuzzy sets defined on the same universe, and B and B0are also fuzzy sets defined on the same universe, which may be different from the universe on which A and A0are defined. In fuzzy control, usually the membership functions of fuzzy sets are defined on the real line, and hence are fuzzy numbers.

Figure 4.3 A fuzzy number A, its complement Ac, and (A OR Ac) using standard min – max fuzzy logic TM.

4.3 APPROXIMATE REASONING 65

Calculation of B0from A, B, and A0is straightforward. First, a fuzzy implication operator is chosen; implication operators are discussed in Section 3.1. The implication A(x)!B(y) defines a fuzzy relation A!B between A and B. Next, B0 is calculated by composing A0 with A!B, following the procedure in Section 3.4.2:

B0¼A0(A!B) (4:30)

The fuzzy conclusion B0is computed using the compositional rule of inference B0¼A0oR (Sections 3.4.1 – 3.4.2). This expression defines the membership function for the fuzzy conclusion B0. The compositional rule of inference is valid for all fuzzy sets; they do not have to be fuzzy numbers. A and A0must be fuzzy subsets of the same universal set X, and B and B0must be fuzzy subsets of a universal set Y, which may or may not be the same as X. Let us go through the details of the compositional rule of inference for discrete fuzzy sets. Let

A¼ 0:3 Choose the implication operator T(x, y)¼min(1, 12xþy), called the Lukasiewicz implication operator, in equation (3.8). Then, R(x, y) is shown in (4.33).

The fuzzy sets A and B in approximate reasoning are usually fuzzy numbers (or mem-bership functions defined on the real line).

Approximate reasoningusing the generalized modus ponens has been proposed for fuzzy inference from if – then rules. Consider the fuzzy if – then rule

If x is Big, then y is Slow (4:36)

Where Big is defined by fuzzy number A and Slow is specified by fuzzy number B. Now suppose we are presented with a new piece of information about Big in the form of fuzzy set A0. That is, we are given that x¼A0 and this new fuzzy number does not have to equal A. Figure 4.4 shows an example of fuzzy numbers A, B and A0. A0is close to A, but not identical.

Given the fuzzy rule in equation (4.27) and the data x¼A0, we wish to draw a conclusion about Slow. If the conclusion is y¼B0, we can apply the generalized modus ponens in (4.24) compute a new fuzzy number B0 for Speed. To do this we must first choose an fuzzy logical implication operator I(x, y) giving the impli-cation relation between A(x) and B( y). I(x, y) could be any function that will reduce to the classical values for implication in Table 3.2 when x and y are 0 or 1, so we could use any of the formulas given in equations (3.7) – (3.9) or any other fuzzy implication operator.

There are many fuzzy implication operators from which to choose; Klir and Yuan (1995, p. 309) list fourteen. Choice, according to Klir and Yuan (1995), will depend on the application. Our application is clear; we wish to employ the implication oper-ator in the generalized fuzzy modus ponens. Let R be the fuzzy relation (A!B).

We pick the simplest (Gaines – Rescher), defined by equation (4.28),

R(x, y)¼tv(A(x)!B(y))¼1 if tv(A(x))tv(B( y)), else R(x, y)¼0 (4:37)

Figure 4.4 Membership functions of fuzzy numbers A, A0, and B.

4.3 APPROXIMATE REASONING 67

and obtain B0by composing A0with R, using

B0(y)¼supx{(A0(x),R(x,y))} (4:38) where sup denotes supremum, the smallest number that is not exceeded by the argu-ments. Carrying out the calculation for 0x20, we obtain the B0 shown in Figure 4.5.

We can see immediately that B0is nowhere less than 0.5 on the entire real line.

Clearly, using the centroid method to defuzzify a membership function that extends from2infinity toþinfinity with non-zero membership is not possible. The problem is not caused by the particular implication operator chosen; any implication operator that reduces to the classical for crisp operands has a similar problem.

Another problem is the property of consistency. We say a method of fuzzy reasoning is consistent if whenever A0¼A, we get the conclusion B0¼B; that is, if the data matches the antecedent exactly, the conclusion must match the conse-quent exactly. However, approximate reasoning may, or may not, be consistent. It depends on the implication operator. For some it is consistent and for other impli-cation operators it is not consistent. Klir and Yuan (1995, p. 309) list 14 impliimpli-cation operators, of which 7 do not possess consistency. [The Gaines – Rescher implication in equation (4.28) is consistent.]

A third problem is that if A0>A¼1using Tm, we get B0( y)¼1 for all y; if the data A0and the specification A are disjoint, the conclusion is the universal set. We have been assuming that I(0, y)¼1 for all y, which is true for most of the usual implication operators (Klir and Yuan, 1995). You are also asked to check this result in the problems. Because of these reasons, and others discussed in Chapter 8, we will not use approximate reasoning in our fuzzy expert system. What is used in practice is not an implication operator, but a fuzzy AND (t-norm). Although of

Figure 4.5 Membership functions of fuzzy numbers A, A0, B, and B0. B0is obtained from A, A0, and B by Approximate Reasoning using Gaines – Rescher implication.

course a t-norm is not an implication at all, the min t-norm used in this context is sometimes called a “Mamdani implication”, from its use by Mamdani in fuzzy control.

The above discussion assumed that approximate reasoning was based on fuzzy implications that reduce to the classical for crisp operands. Fuzzy inference may be based on other fuzzy relations R. Going back to equation (4.28), we could define R by

R(x,y)¼min(A(x),B(y)) (4:39)

We can compose A0with this R to obtain B0. If we do, we get the perfectly reason-able result shown in Figure 4.6. In fact, this general type of fuzzy relation based on t-norms is used almost universally in fuzzy control.

Approximate reasoning may be extended to more complex antecedents and to blocks (multiple) of IF-the rules (Klir and Yuan, 1995). However, we shall not present further results in this book.

4.4 HEDGES

Hedges are modifiers, adjectives, or adverbs, which change truth values. Such hedges as “about”, “nearly”, “roughly”, and so on, are used in fuzzy expert systems to make writing rules easier and to make programs more understandable for users and domain experts. The term was originated by Zadeh (1972), and hedges have been developed and used to great effect by Cox (1999), which is highly recommended. Hedges are indispensible to the builder of fuzzy expert systems in the real world. There are several types of hedges, of which we will con-sider the two most important.

Figure 4.6 Membership functions of fuzzy numbers A, A0, B, and B0. B0 is obtained by composing A0with (A AND B).

4.4 HEDGES 69

One type of hedge, applied to scalar numbers, changes the scalar to a fuzzy number with dispersion depending on the particular term used. Thus, “nearly 2”

is a fuzzy number with small dispersion, and “roughly 2” has a considerably wider spread. The precise meaning of the hedge term will vary from one expert system shell to another.

In FLOPS, each hedge term is associated with a percent of the central value, and specifies the spread of the fuzzy number from the central value to the 0.5 truth value point. [The reason the spread is specified at the 0.5 truth value rather than the support is that normal (bell-shaped, Gaussian) fuzzy numbers in theory have infinite support, and in practice a large support depending on the precision of the floating-point numbers in a particular implementation.]

FLOPS hedges of this type are not untypical of those employed by Cox. The hedge terms and corresponding membership function spread are given in Table 4.1, and are

TABLE 4.1 Hedges that Create Fuzzy Numbers Hedge Spread,þ/2% of central value at

membership 0.5

nearly 5%

about 10%

roughly 25%

crudely 50%

Figure 4.7 A fuzzy 5 created by various hedges.

TABLE 4.2 Hedges to Modify Truth Values

Hedge Power to which truth value is raised

slightly cube root

somewhat square root

very square

extremely cube

shown graphically as a fuzzy 5 in Figure 4.7. We assume that the fuzzy number is symmetrical, with a single value of the argument (the central value) at which the membership is one. The shape of the resulting fuzzy number is assumed separately specified, and may be linear, s-shaped (piecewise quadratic) or normal.

The second type of hedge is applied to truth values. “very Small” reduces the truth value of Small; “somewhat Small” increases the truth value. Usually, the orig-inal truth value is raised to a power greater than 1 for terms that reduce truth values, and less than 1 for terms that increase truth values. Table 4.2 defines hedges for modification of truth values, and Figure 4.8 gives a sample membership function modified by hedges. Again, the hedges employed by FLOPS are similar to those used by Cox.

As shown in Figure 4.8, hedges can operate on membership functions producing modified membership functions, and can be used to modify clauses in fuzzy propositions. Consider the fuzzy proposition

speed is Fast

Figure 4.8 A membership function modified by hedges.

Figure 4.9 Membership function Very_Small created without hedges.

4.4 HEDGES 71

This can be modified by substituting very Fast, somewhat fast, and so on. If the grade of membership of Fast in speed is 0.5, the truth value of (somewhat Fast) would be 0.51/2¼0.707, of (slightly Fast) 0.51/3¼0.794, of (very Fast) 0.52¼0.25, and of (extremely fast) 0.53¼0.125.

However, we have found that in practice such hedges applied to membership functions can be confusing and inflexible. It is possible to use separate linguistic terms such as Slow and Very_slow, each with its own membership function, rather than use hedges applied to membership functions. For example, the member-ship function for Very_Small in Figure 4.9 cannot be created by using the usual power-based hedges just described.

Dans le document FUZZY EXPERT SYSTEMS AND FUZZY REASONING (Page 82-89)