Model Based on Fuzzy Set Theory

13.1 Model Based on Fuzzy Set Theory

First of all, we introduce a universe of discourse U , which is the set of all the considered elements. If we want to represent a notion A in a knowledge base, then we can define it as the set:

A = {x : x has features which are consistent with the notion A, x ∈ U }. (13.1) Now, in order to decide whether an element y ∈ U fulfills the conditions of the

definition of a notion A we should have a membership function for the set A, which is denoted µ A . In the case of a crisp notion, which is a notion for which we are able to define features allowing the system to distinguish objects/phenomena which have the properties of this notion from those which do not have them, the membership

function is equal to the characteristic function χ A of the set A. This function is defined in the following way.

However, in the case of a vague notion, which is not defined in an precise and unam- biguous way, a characteristic function is not an appropriate formalism for solving such a problem. This observation allowed Lotfi A. Zadeh to formulate fuzzy set the- ory in 1965 [321]. In this theory the membership function for a set A is defined in the following way:

µ A : U −→ [ 0, 1].

(13.3) This function assigns values 0 and 1 to an element x ∈ U according to formula ( 13.2 )

for the function χ A . However, in case of partial membership of an element in the set

A it assigns a value s, which belongs to the interval (0, 1). This value is called the grade of membership of the set A. If the membership function is defined in such a way, then the set is called a fuzzy set.

Let us consider the following example of how to represent vague notions with the help of fuzzy sets. Let us assume that we want to characterize a human being’s age with vague notions young (Y), adult (A), and old (O). Let us restrict our consid- erations to the age interval [0, 101]. Then, these vague notions can be represented by fuzzy sets Y , A, O, respectively, and, in fact, by the corresponding membership

functions 3 µ Y ,µ A ,µ O . For example, these functions can be defined as shown in 2 Formal definitions of fuzzy set and rough set theories are contained in Appendix J.

3 A membership function for a set determines this set.

13.1 Model Based on Fuzzy Set Theory 191 Fig. 13.1 Membership

functions for fuzzy sets for the example of a human being’s age: µ Y —for the

µ O (x) notion young, µ A —for the

notion adult, µ O —for the notion old

Fig. 13.1 . (The function µ Y is marked with a solid line, the function µ A —with a dashed line, the function µ O —with a dotted line.) People of age 0–20 are definitely considered to be young (µ Y ( x) =

1.0, x ∈ [0, 20]) and people of age more than

60 are definitely considered to be old (µ O ( x) =

1.0, x ∈ [60, 101]). A typical adult is 40 years old (µ A (

40) = 1.0). If a person has completed 20 years and pro- gresses in age, then we consider her/him less and less young. If a person completes

30 years, we consider her/him adult rather than young (µ Y ( x) < µ A ( x), x ∈ [

30, 40]). If a person completes 40 years we definitely do not consider her/him to be young (µ Y ( x) =

0.0, x ∈ [40, 101]), etc. As we can see fuzzy sets allow us to represent vague notions in a convenient way. The formalism used in the example is called a linguistic variable in fuzzy set theory [40, 322]. The term human being age is called a name of a linguistic variable. The vague notions young (Y), adult (A), and old (O) are called linguistic values. A mapping which assigns a fuzzy set to a vague notion, i.e., to a linguistic value, is called a semantic function.

Nowadays, fuzzy set theory is well developed and formalized. Apart from com- plete characteristics of operations with fuzzy sets, e.g., the union of fuzzy sets, the intersection of fuzzy sets, etc., such models as fuzzy numbers and operations with them, fuzzy relations, and fuzzy grammars and automata have been developed. Since this book is an introduction to the field, we do not discuss these issues here. Later, we introduce two formalisms which are very important in AI, namely fuzzy logic and fuzzy rule-based systems.

The possibility of the occurrence of vague notions is a basic difference between the propositions considered in fuzzy logic [105, 192, 249, 322] and propositions of a classical logic. In consequence, instead of assigning two logical values 1 (True) and

0 (False) to propositions, we can assign values which belong to the interval [0, 1]. 4 Similarly as for sets, we define the truth degree function T . Let P be a proposition: “x is P”, where P is a vague notion for which a fuzzy set P is determined by a

4 Fuzzy logic is an example of multi-valued logic with an infinite number of values, which has been introduced by Polish logician and mathematician Jan Łukasiewicz.

192 13 Defining Vague Notions in Knowledge-Based Systems semantic function. The truth degree function T assigns a value to a proposition P

according to the following formula.

(13.4) where µ P is the membership function for the set P. The function T can be extended to

T (P) = µ P ( x),

propositions defined with the help of logical operators. For example, for the negation of a proposition P, i.e., for the proposition ¬P, “x is not P”, the function T (¬P) =

1 − T (P) = 1 − µ P ( x) . For a conjunction of propositions P and Q, i.e., for the proposition P ∧ Q, “x is P and Q”, the function T (P ∧ Q) = mi n{T (P) , T (Q)} = mi n{µ P ( x) , µ Q ( x)} , where mi n{x , y} selects the lesser value of x and y. 5

Let us continue our example concerning vague notions of human age. We can formulate the proposition ¬Y, “x is not young”, i.e., “x is not Y”. The function T (¬Y) = 1−µ Y ( x) is shown in Fig. 13.2 a. As we can see, the function T is defined in an intuitive way. Now, let us define this function for the more complex case of the conjunction Y ∧ A, “x is young and adult”, i.e., “x is Y and A”, which is shown in

Fig. 13.2 b. As we can see, the function T (Y ∧ A) equals 0 in the interval [0, 20]. (In this interval the function µ A ( x) gives a lower value than µ Y ( x) and it equals 0.) This is consistent with our intuition, since we do not consider somebody who belongs to this interval a “mature/adult person”. Analogously, the function T (Y ∧ A) equals

0 in the interval [40, 101]. (In this interval the function µ Y ( x) gives a lower value than µ A ( x) and it equals 0.) This is also consistent with our intuition, since we do not consider somebody who belongs to this interval a young person. For the interval [

20, 40] we have two cases. In the subinterval [20, 30] we use the lower value as the value of T (Y ∧ A), i.e., we use the value of the function µ A ( x) . It increases in this subinterval and it reaches its maximum at the age of 30 years. At this point the charts of membership functions µ Y ( x) and µ A ( x) meet and they determine the best representative of being young and adult. In the second subinterval, i.e., [30, 40] the value of the function T (Y ∧ A), which measures the truth degree of being adult and (at the same time) young , decreases. Although, in this subinterval, as time goes by, we are more and more experienced, we are older and older (unfortunately).

In Chap. 9 , we have presented rule-based reasoning. 6 In the Zadeh theory the concept of a fuzzy rule-based system [191, 322] has been developed. The rules of such a system are of the form:

R k : IF x k is A k ∧...∧ x k is A k THEN y k is B 1 k 1 n n , where x k ,..., x k , y k 1 n are linguistic variables and A k 1 ,...,A k n ,B k are linguistic values

corresponding to fuzzy sets A k 1 ,..., A k n , B k .

Now, we present an example of reasoning in a fuzzy rule-based system. We do this using one of the first models of fuzzy reasoning. It was introduced by Ebrahim

5 A formal definition of the function T for logical operators is contained in Appendix J. 6 If the reader has omitted Chap. 9 , the rest of this section may be difficult to understand.

13.1 Model Based on Fuzzy Set Theory 193

(a)

x is not young

(b)

x is young and adult

m in {µ Y (x) , µ A (x)}

Fig. 13.2 Examples of membership functions for fuzzy sets defined with logical operators: a negation, b conjunction

Mamdani 7 in 1975 [191]. Let us assume that we want to design an expert system which controls the position of a lever regulating the temperature of water in a bathtub faucet. We assume that the linguistic variable t b denoting the water temperature in the bathtub is described with the help of vague notions (linguistic values) (too) low (L), proper (P), (too) high (H) . These notions are represented by fuzzy sets

L , P, H , respectively. Membership functions of these sets are shown in Fig. 13.3 a. The water temperature in the faucet t f is described with the help of vague notions cold (C), warm (W), (nearly) boiling (B) . These notions are represented by fuzzy sets

7 Ebrahim Mamdani—a professor of electrical engineering and computer science at Imperial Col- lege, London. A designer of the first fuzzy controller. His work mainly concerns fuzzy logic.

194 13 Defining Vague Notions in Knowledge-Based Systems

(a)

(b)

(c)

(d)

Fig. 13.3 An example of a problem formulation for fuzzy inference: a membership functions for the temperature of water in a bathtub, b membership functions for the temperature of water in a faucet, c the scheme for the position of a lever, d membership functions for the position of a lever

C , W , B, respectively. Membership functions of these sets are shown in Fig. 13.3 b. Now, we can define the position of the lever. The scheme of this position is shown in Fig. 13.3 c. As we can see the leftmost position corresponds to cold water, the rightmost position corresponds to (almost) boiling water. The position of the lever is defined by the linguistic variable p l , which is described with the help of vague notions a left position (L), a middle position (M), a right position (R). These notions are represented by fuzzy sets: L, M, R, respectively. Membership functions of these

sets are shown in Fig. 13.3 d. We present reasoning in the system with the help of the following two rules.

R 1 : IF t b is proper ∧ t f is warm THEN p l should be in middle_position, R 2 : IF t b is high ∧ t f is boiling THEN p l should be in left_position.

Now, we can start reasoning. Although a fuzzy rule-based system reasons on the basis of fuzzy sets, it receives data and generates results in the form of numerical values. Therefore, it should convert these numerical values into fuzzy sets and vice versa. Let us assume that the system makes the first step of reasoning on the basis

of the first rule. There are two variables, t b and t f , and two linguistic values, P and W, which are represented by membership functions µ P and µ W , respectively, in the condition of the first rule. Let us consider the first pair: t b −µ P . Let us assume that the temperature of water in the bathtub equals t b = T b = 28 ◦

C. We

13.1 Model Based on Fuzzy Set Theory 195 (a)

Fig. 13.4 An example of fuzzy reasoning: a–b fuzzification, c–e application of the first rule, f–h application of the second rule

have to convert the number T b into a fuzzy set on the basis of the membership function µ P . We do this with the help of the simplest fuzzification operation, which is called a singleton fuzzification. It converts the number T b into a fuzzy set P ′ defined by the membership function which equals µ P ′ ( T b ) for T b and equals 0 for other arguments. This operation is shown in Fig. 13.4 a, in which a value µ P (

28) = 0.2 is determined, and in Fig. 13.4 b, in which the new membership function µ P ′ is defined. This function determines the new fuzzy set P ′ , which is the result of the fuzzification of the number T b =

28. Then, let us assume that the temperature of water in the faucet

196 13 Defining Vague Notions in Knowledge-Based Systems

(a)

(b)

Fig. 13.5 An example of fuzzy reasoning—cont.: a constructing the resulting fuzzy set, b defuzzi- fication

t f = T f = 52 ◦

C has been transformed similarly into a fuzzy set W ′ defined by a

membership function µ W ′ shown in Fig. 13.4 d.

Now, we can apply the fuzzy rule R 1 , which is shown in Fig. 13.4 c–e. Figure 13.4 c, d correspond to components in a conjunction of the rule condition COND 1 . Figure 13.4 e corresponds to the rule action AC T 1 . The application of the rule is performed in two steps. At the first step the degree of a rule fulfillment µ COND 1 is computed as the minimum of the set which contains the membership functions of

the components of the conjunction C O N D 1 (according to the evaluation of a con- dition in fuzzy logic introduced above). Thus, as shown in Fig. 13.4 c, d, this degree equals µ COND 1 = 0.2. At the second step we use the Mamdani minimum rule of fuzzy reasoning. Accord- ing to this rule the membership function of a fuzzy set which corresponds to reasoning

C O N D → AC T is determined by the lower number of µ COND and µ AC T . Since

0.2, the resulting membership function is obtained by truncating the membership function of the rule action µ AC T =µ M at the level of

in our example µ COND 1 =

0.2, as shown in Fig. 13.4 e.

Performing analogous steps for the fuzzy rule R 2 , cf. Fig. 13.4 f–h, we obtain the result shown in Fig. 13.4 h. After firing the applicable rules 8 we should aggregate the conclusions which have been obtained. Let us notice that the conclusion is of the form of truncated membership functions. In our example, membership functions for the conclusions

are marked with solid lines in Fig. 13.4 e, h. The operation of aggregating these functions is shown in Fig. 13.5 a. As we can see, this time we use the maximum operation over the set of conclusions, i.e., we define the final membership function taking the greatest value of the aggregated functions.

This final membership function determines a fuzzy set, which is the result of fuzzy reasoning. However, we need a numeric value representing the angle of the position

8 A fuzzy rule is not applicable at a reasoning cycle if its degree of fulfillment equals 0.

13.1 Model Based on Fuzzy Set Theory 197 of the lever, cf. Fig. 13.3 c (not a fuzzy set). Therefore, at the end we should perform

a defuzzification operation, which determines a numerical value on the basis of a fuzzy set. For example, a defuzzification operation with a centroid involves computing the center of gravity of the area under a curve determined by the final membership function, which is shown in Fig. 13.5 b. The coordinate of this center on the axis of the linguistic variable (the variable p l in the case of our example) determines the resulting numerical value. In Fig. 13.5 b the center of gravity is marked by a circle with a cross inside. As we can see the resulting numerical value, which represents

C. Thus, our expert system sets the lever in this position after fuzzy reasoning.

the correct angle of the lever is p l = P l = 48 ◦

Dokumen yang terkait

Hubungan pH dan Viskositas Saliva terhadap Indeks DMF-T pada Siswa-siswi Sekolah Dasar Baletbaru I dan Baletbaru II Sukowono Jember (Relationship between Salivary pH and Viscosity to DMF-T Index of Pupils in Baletbaru I and Baletbaru II Elementary School)

0 46 5

Institutional Change and its Effect to Performance of Water Usage Assocition in Irrigation Water Managements

0 21 7

The Effectiveness of Computer-Assisted Language Learning in Teaching Past Tense to the Tenth Grade Students of SMAN 5 Tangerang Selatan

4 116 138

the Effectiveness of songs to increase students' vocabuloary at second grade students' of SMP Al Huda JAkarta

3 29 100

The effectiveness of classroom debate to improve students' speaking skilll (a quasi-experimental study at the elevent year student of SMAN 3 south Tangerang)

1 33 122

Kerjasama ASEAN-China melalui ASEAN-China cooperative response to dangerous drugs (ACCORD) dalam menanggulangi perdagangan di Segitiga Emas

2 36 164

The Effect of 95% Ethanol Extract of Javanese Long Pepper (Piper retrofractum Vahl.) to Total Cholesterol and Triglyceride Levels in Male Sprague Dawley Rats (Rattus novergicus) Administrated by High Fat Diet

2 21 50

Factors Related to Somatosensory Amplification of Patients with Epigas- tric Pain

0 0 15

The Concept and Value of the Teaching of Karma Yoga According to the Bhagavadgita Book

0 0 9

Pemanfaatan Permainan Tradisional sebagai Media Pembelajaran Anak Usia Dini untuk Mengembangkan Aspek Moral dan Bahasa Anak Utilization of Traditional Games as Media Learning Early Childhood to Develop Aspects of Moral and Language Children Irfan Haris

0 0 11