C++ Neural Networks and Fuzzy Logic
A Fuzzy Universe of Applications
Download 1.14 Mb. Pdf ko'rish
|
C neural networks and fuzzy logic
- Bu sahifa navigatsiya:
- Engineering and Computer Science
- Section I: A Look at Fuzzy Databases and Quantification
- C++ Neural Networks and Fuzzy Logic by Valluru B. Rao MTBooks, IDG Books Worldwide, Inc. ISBN
- Table 16.1
- a, b, c, and d
- Table 16.2
- nov_rarely
- Matrix Representation of a Fuzzy Relation
A Fuzzy Universe of Applications Fuzzy logic is being applied to a wide variety of problems. The most pervasive field of influence is in control systems, with the rapid acceptance of fuzzy logic controllers (FLCs) for machine and process control. There are a number of other areas where fuzzy logic is being applied. Here is a brief list adapted from Yan, et al., with examples in each area:
logic based manipulation of prosthetic devices, fuzzy logic based analysis of movement disorders, etc. • Management and Decision Support Fuzzy logic based factory site selection, fuzzy logic aided military decision making (sounds scary, but remember that the fuzzy in fuzzy logic applies to the imprecision in the data and not in the logic), fuzzy logic based decision making for marketing strategies, etc. • Economics and Finance Fuzzy modeling of complex marketing systems, fuzzy logic based trading systems, fuzzy logic based cost−benefit analysis, fuzzy logic based investment evaluation, etc. • Environmental Science Fuzzy logic based weather prediction, fuzzy logic based water quality control, etc. • Engineering and Computer Science Fuzzy database systems, fuzzy logic based prediction of earthquakes, fuzzy logic based automation of nuclear plant control, fuzzy logic based computer network design, fuzzy logic based evaluation of architectural design, fuzzy logic control systems, etc.
of resources, etc. • Pattern Recognition and Classification Fuzzy logic based speech recognition, fuzzy logic based handwriting recognition, fuzzy logic based facial characteristic analysis, fuzzy logic based military command analysis, fuzzy image search, etc.
based on fuzzy logic reasoning, etc. C++ Neural Networks and Fuzzy Logic:Preface Chapter 16 Applications of Fuzzy Logic 378
• Reliability and Quality Control Fuzzy logic based failure diagnosis, production line monitoring and inspection, etc. We will now move to one of the two application domains that we will discuss in depth, Fuzzy Databases. Later in the chapter, we examine the second application domain, Fuzzy Control Systems. Section I: A Look at Fuzzy Databases and Quantification In this section, we want to look at some ways in which fuzzy logic may be applied to databases and operations with databases. Standard databases have crisp data sets, and you create unambiguous relations over the data sets. You also make queries that are specific and that do not have any ambiguity. Introducing ambiguity in one or more of these aspects of standard databases leads to ideas of how fuzzy logic can be applied to databases. Such application of fuzzy logic could mean that you get databases that are easier to query and easier to interface to. A fuzzy search, where search criteria are not precisely bounded, may be more appropriate than a crisp search. You can recall any number of occasions when you tend to make ambiguous queries, since you are not certain of what you need. You also tend to make ambiguous queries when a “ball park” value is sufficient for your purposes. In this section, you will also learn some more concepts in fuzzy logic. You will see these concepts introduced where they arise in the discussion of ideas relating to fuzzy databases. You may at times see somewhat of a digression in the middle of the fuzzy database discussion to fuzzy logic topics. You may skip to the area where the fuzzy database discussion is resumed and refer back to the skipped areas whenever you feel the need to get clarification of a concept. We will start with an example of a standard database, relations and queries. We then point out some of the ways in which fuzziness can be introduced. Previous Table of Contents Next Copyright © IDG Books Worldwide, Inc. C++ Neural Networks and Fuzzy Logic:Preface Section I: A Look at Fuzzy Databases and Quantification 379
C++ Neural Networks and Fuzzy Logic by Valluru B. Rao MTBooks, IDG Books Worldwide, Inc. ISBN: 1558515526 Pub Date: 06/01/95 Previous Table of Contents Next Databases and Queries Imagine that you are interested in the travel business. You may be trying to design special tours in different countries with your own team of tour guides, etc. , and you want to identify suitable persons for these positions. Initially, let us say, you are interested in their own experiences in traveling, and the knowledge they possess, in terms of geography, customs, language, and special occasions, etc. The information you want to keep in your database may be something like, who the person is, the person’s citizenship, to where the person traveled, when such travel occurred, the length of stay at that destination, the person’s languages, the languages the person understands, the number of trips the person made to each place of travel, etc. Let us use some abbreviations:
Typical entries may appear as noted in Table 16.1. Table 16.1 Example Database Nameagectzcovlovnovyovlpslpuhs John Smith35U.S.India411994Hindi1 John Smith35U.S.Italy721991Italian1 John Smith35U.S.Japan3119930 When a query is made to list persons that visited India or Japan after 1992 for 3 or more days, John Smith’s two entries will be included. The conditions stated for this query are straightforward, with lov [ge] 3 and yov > 1992 and (cov = India or cov = Japan).
A relation from this database may be the set of quintuples, (name, age, cov, lov, yov). Another may be the set of triples, (name, ctz, lps). The quintuple (John Smith, 35, India, 4, 1994) belongs to the former relation, and the triple (John Smith, U.S., Italian) belongs to the latter. You can define other relations, as well. C++ Neural Networks and Fuzzy Logic:Preface Databases and Queries 380
Fuzzy Scenarios Now the query part may be made fuzzy by asking to list young persons who recently visited Japan or India for a few days. John Smith’s entries may or may not be included this time since it is not clear if John Smith is considered young, or whether 1993 is considered recent, or if 3 days would qualify as a few days for the query. This modification of the query illustrates one of three scenarios in which fuzziness can be introduced into databases and their use. This is the case where the database and relations are standard, but the queries may be fuzzy. The other cases are: one where the database is fuzzy, but the queries are standard with no ambiguity; and one where you have both a fuzzy database and some fuzzy queries.
We will illustrate the concept of fuzziness in the case where the database and the queries have fuzziness in them. Our discussion is guided by the reference Terano, Asai, and Sugeno. First, let us review and recast the concept of a fuzzy set in a slightly different notation. If a, b, c, and d are in the set A with 0.9, 0.4, 0.5, 0, respectively, as degrees of membership, and in B with 0.9, 0.6, 0.3, 0.8, respectively, we give these fuzzy sets A and B as A = { 0.9/a, 0.4/b, 0.5/c} and B = {0.9/a, 0.6/b, 0.3/c, 0.8/d}. Now A[cup]B = {0.9/a, 0.6/b, 0.5/c, 0.8/d} since you take the larger of the degrees of membership in A and B for each element. Also, A[cap]B = {0.9/a, 0.4/b, 0.3/c} since you now take the smaller of the degrees of membership in A and B for each element. Since d has 0 as degree of membership in
Let us impart fuzzy values (FV) to each of the attributes, age, lov, nov, yov, and hs by defining the sets in Table 16.2.
FV(age){ very young, young, somewhat old, old } FV(nov){ never, rarely, quite a few, often, very often } FV(lov){ barely few days, few days, quite a few days, many days } FV(yov){distant past, recent past, recent } FV(hs){ barely, adequately, quite a bit, extensively } The attributes of name, citizenship, country of visit are clearly not candidates for having fuzzy values. The attributes of lps, and lpu, which stand for language in which speaking proficiency and language in which understanding ability exist, can be coupled into another attribute called flp (foreign language proficiency) with fuzzy values. We could have introduced in the original list an attribute called lpr ( language with proficiency to read) along with lps and lpu. As you can see, these three can be taken together into the fuzzy−valued attribute of foreign language proficiency. We give below the fuzzy values of flp. FV(flp) = {not proficient, barely proficient, adequate, proficient, very proficient } Note that each fuzzy value of each attribute gives rise to a fuzzy set, which depends on the elements you consider for the set and their degrees of membership. C++ Neural Networks and Fuzzy Logic:Preface Fuzzy Scenarios 381
Previous Table of Contents Next Copyright © IDG Books Worldwide, Inc. C++ Neural Networks and Fuzzy Logic:Preface Fuzzy Scenarios 382
C++ Neural Networks and Fuzzy Logic by Valluru B. Rao MTBooks, IDG Books Worldwide, Inc. ISBN: 1558515526 Pub Date: 06/01/95 Previous Table of Contents Next Now let us determine the fuzzy sets that have John Smith as an element, besides possibly others. We need the values of degrees of membership for John Smith (actually his attribute values) in various fuzzy sets. Let us pick them as follows: —————————————————————————————————————————————————————————————————————————— Age: m very young (35) = 0 (degree of membership of 35 in very young is 0. We will employ this notation from now on). m young
(35) = 0.75 m somewhat old (35) = 0.3 m old
(35) = 0 —————————————————————————————————————————————————————————————————————————— Assume that similar values are assigned to the degrees of membership of values of John Smith’s attributes in other fuzzy sets. Just as John Smith’s age does not belong in the fuzzy sets young and old, some of his other attribute values do not belong in some of the other fuzzy sets. The following is a list of fuzzy sets in which John Smith appears: age_young = {0.75/35, ...} age_somewhat old = {0.3/35, ... } A similar statement attempted for the number of visits may prompt you to list nov_rarely = {0.7/1, 0.2/2}, and nov_quite a few = {0.3/2, .6/3, ...}. But you readily realize that the number of visits by itself does not mean much unless it is referenced with the country of visit. A person may visit one country very often, but another only rarely. This suggests the notion of a fuzzy relation, which is also a fuzzy set. NOTE: What follows is an explanation of relations and discussion of fuzzy relations. If you want to skip this part for now, you may go to the “Fuzzy Queries” section a few pages later in this chapter.
A standard relation from set A to set B is a subset of the Cartesian product of A and B, written as A×B. The elements of A×B are ordered pairs (a, b) where a is an element of A and b is an element of B. For example, the ordered pair (Joe, Paul) is an element of the Cartesian product of the set of fathers, which includes Joe and the set of sons which includes Paul. Or, you can consider it as an element of the Cartesian product of the set of men with itself. In this case, the ordered pair (Joe, Paul) is in the subset which contains (a, b, if a is the father of b. This subset is a relation on the set of men. You can call this relation “father.” A fuzzy relation is similar to a standard relation, except that the resulting sets are fuzzy sets. An example of such a relation is ‘much_more_educated’. This fuzzy set may look something like, much_more_educated = { ..., 0.2/(Jeff, Steve), 0.7/(Jeff, Mike), ... } C++ Neural Networks and Fuzzy Logic:Preface Fuzzy Relations 383
Matrix Representation of a Fuzzy Relation A fuzzy relation can be given as a matrix also when the underlying sets, call them domains, are finite. For example, let the set of men be S = { Jeff, Steve, Mike }, and let us use the same relation, much_more_educated. For each element of the Cartesian product S×S, we need the degree of membership in this relation. We already have two such values, m much_more_educated (Jeff, Steve) = 0.2, and m much_more_educated (Jeff, Mike) = 0.7. What degree of membership in the set should we assign for the pair (Jeff, Jeff)? It seems reasonable to assign a 0. We will assign a 0 whenever the two members of the ordered pair are the same. Our relation much_more_educated is given by a matrix that may look like the following: 0/(Jeff, Jeff) 0.2/(Jeff, Steve) 0.7/(Jeff, Mike) much_more_educated = 0.4/(Steve, Jeff) 0/(Steve, Steve) 0.3/(Steve, Mike) 0.1/(Mike, Jeff) 0.6/(Mike, Steve) 0/(Mike, Mike) NOTE: Note that the first row corresponds to ordered pairs with Jeff as the first member, second column corresponds to those with Steve as the second member, and so on. The main diagonal has ordered pairs where the first and second members are the same. Previous Table of Contents Next Copyright © IDG Books Worldwide, Inc. C++ Neural Networks and Fuzzy Logic:Preface Matrix Representation of a Fuzzy Relation 384
C++ Neural Networks and Fuzzy Logic by Valluru B. Rao MTBooks, IDG Books Worldwide, Inc. ISBN: 1558515526 Pub Date: 06/01/95 Previous Table of Contents Next Properties of Fuzzy Relations A relation on a set, that is a subset of a Cartesian product of some set with itself, may have some interesting properties. It may be reflexive. For this you need to have 1 for the degree of membership of each main diagonal entry. Our example here is evidently not reflexive. A relation may be symmetric. For this you need the degrees of membership of each pair of entries symmetrically situated to the main diagonal to be the same value. For example (Jeff, Mike) and (Mike, Jeff) should have the same degree of membership. Here they do not, so our example of a relation is not symmetric. A relation may be antisymmetric. This requires that if a is different from b and the degree of membership of the ordered pair (a, b) is not 0, then its mirror image, the ordered pair (b, a), should have 0 for degree of membership. In our example, both (Steve, Mike) and (Mike, Steve) have positive values for degree of membership; therefore, the relation much_more_educated over the set {Jeff, Steve, Mike} is not antisymmetric also. A relation may be transitive. For transitivity of a relation, you need the following condition, illustrated with our set {Jeff, Steve, Mike}. For brevity, let us use r in place of much_more_educated, the name of the relation: min (m r (Jeff, Steve) , m r (Steve, Mike) )[le]m r (Jeff, Mike) min (m r (Jeff, Mike) , m r (Mike, Steve) )[le]m r (Jeff, Steve) min (m r (Steve, Jeff) , m r (Jeff, Mike) )[le]m r (Steve, Mike) min (m r (Steve, Mike) , m r (Mike, Jeff) )[le]m r (Steve, Jeff) min (m r (Mike, Jeff) , m r (Jeff, Steve) )[le]m r (Mike, Steve) min (m r (Mike, Steve) , m r (Steve, Jeff) )[le]m r (Mike, Jeff) In the above listings, the ordered pairs on the left−hand side of an occurrence of [le] are such that the second member of the first ordered pair matches the first member of the second ordered pair, and also the right−hand side ordered pair is made up of the two nonmatching elements, in the same order. In our example, min (m r (Jeff, Steve) , m r (Steve, Mike) ) = min (0.2, 0.3) = 0.2 m r
For this instance, the required condition is met. But in the following: min (m r (Jeff, Mike), m r (Mike, Steve) ) = min (0.7, 0.6) = 0.6 m r
The required condition is violated, so the relation much_more_educated is not transitive. C++ Neural Networks and Fuzzy Logic:Preface Properties of Fuzzy Relations 385
NOTE: If a condition defining a property of a relation is not met even in one instance, the relation does not possess that property. Therefore, the relation in our example is not reflexive, not symmetric, not even antisymmetric, and not transitive. If you think about it, it should be clear that when a relation on a set of more than one element is symmetric, it cannot be antisymmetric also, and vice versa. But a relation can be both not symmetric and not antisymmetric at the same time, as in our example. An example of reflexive, symmetric, and transitive relation is given by the following matrix: 1 0.4 0.8 0.4 1 0.4 0.8 0.4 1 Similarity Relations A reflexive, symmetric, and transitive fuzzy relation is said to be a fuzzy equivalence relation. Such a relation is also called a similarity relation. When you have a similarity relation s, you can define the similarity class of an element x of the domain as the fuzzy set in which the degree of membership of y in the domain is m s (x, y). The similarity class of x with the relation s can be denoted by [x] s . Resemblance Relations Do you think similarity and resemblance are one and the same? If x is similar to y, does it mean that x resembles y? Or does the answer depend on what sense is used to talk of similarity or of resemblance? In everyday jargon, Bill may be similar to George in the sense of holding high office, but does Bill resemble George in financial terms? Does this prompt us to look at a ‘resemblance relation’ and distinguish it from the ‘similarity relation’? Of course. Recall that a fuzzy relation that is reflexive, symmetric, and also transitive is called similarity relation. It helps you to create similarity classes. If the relation lacks any one of the three properties, it is not a similarity relation. But if it is only not transitive, meaning it is both reflexive and symmetric, it is still not a similarity relation, but it is a resemblance relation. An example of a resemblance relation, call it t, is given by the following matrix. Let the domain have elements a, b, and c: 1 0.4 0.8
0.8 0.5 1 This fuzzy relation is clearly reflexive, and symmetric, but it is not transitive. For example: min (m t (a, c) , m t (c, b) ) = min (0.8, 0.5) = 0.5 , but the following: m
t (a, b) = 0.4 < 0.5 , is a violation of the condition for transitivity. Therefore, t is not a similarity relation, but it certainly is a resemblance relation. C++ Neural Networks and Fuzzy Logic:Preface Similarity Relations 386
Fuzzy Partial Order One last definition is that of a fuzzy partial order. A fuzzy relation that is reflexive, antisymmetric, and transitive is a fuzzy partial order. It differs from a similarity relation by requiring antisymmetry instead of symmetry. In the context of crisp sets, an equivalence relation that helps to generate equivalence classes is also a reflexive, symmetric, and transitive relation. But those equivalence classes are disjoint, unlike similarity classes with fuzzy relations. With crisp sets, you can define a partial order, and it serves as a basis for making comparison of elements in the domain with one another. Previous Table of Contents Next Copyright © IDG Books Worldwide, Inc. C++ Neural Networks and Fuzzy Logic:Preface Fuzzy Partial Order 387
|
ma'muriyatiga murojaat qiling